[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20121221133610.bb516813.akpm@linux-foundation.org>
Date: Fri, 21 Dec 2012 13:36:10 -0800
From: Andrew Morton <akpm@...ux-foundation.org>
To: Sasha Levin <sasha.levin@...cle.com>
Cc: Hugh Dickins <hughd@...gle.com>, Michal Hocko <mhocko@...e.cz>,
Konstantin Khlebnikov <khlebnikov@...nvz.org>,
Mel Gorman <mgorman@...e.de>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, Sasha Levin <levinsasha928@...il.com>
Subject: Re: [PATCH v2] mm,ksm: use new hashtable implementation
On Fri, 21 Dec 2012 12:46:50 -0500
Sasha Levin <sasha.levin@...cle.com> 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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists