Thread (3 messages) 3 messages, 2 authors, 2012-12-21

Re: [PATCH v2] mm,ksm: use new hashtable implementation

From: Andrew Morton <akpm@linux-foundation.org>
Date: 2012-12-21 21:36:14
Also in: lkml

On Fri, 21 Dec 2012 12:46:50 -0500
Sasha Levin [off-list ref] wrote:
Switch ksm to use the new hashtable implementation. This reduces the amount of
generic unrelated code in the ksm module.
hm, include/linux/hashtable.h:hash_min() is rather dangerous - it
returns different values depending on the size of the first argument. 
So if the calling code mixes up its ints and longs (and boy we do that
a lot), the result will work on 32-bit and fail on 64-bit.

Also, is there ever likely to be a situation where the first arg to
hash_min() is *not* a pointer?  Perhaps it would be better to concede
to reality: rename `key' to `ptr' and remove all those typcasts you
just added.

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help