]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] fix alloc_large_system_hash() roundup
authorJohn Hawkes <hawkes@sgi.com>
Sat, 25 Mar 2006 11:08:02 +0000 (03:08 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Sat, 25 Mar 2006 16:22:58 +0000 (08:22 -0800)
commit192ebc9fdbd2e3b95061d21a1603e2941d666a0b
tree9178f07eb643123d20a95e4ec08477f2c85bd9ea
parentb9bd7507d9e1984fff5c52229b6897458abffe81
[PATCH] fix alloc_large_system_hash() roundup

The "rounded up to nearest power of 2 in size" algorithm in
alloc_large_system_hash is not correct.  As coded, it takes an otherwise
acceptable power-of-2 value and doubles it.  For example, we see the error
if we boot with thash_entries=2097152 which produces a hash table with
4194304 entries.

Signed-off-by: John Hawkes <hawkes@sgi.com>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: "Chen, Kenneth W" <kenneth.w.chen@intel.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
mm/page_alloc.c