linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* zone->wait_table_bits contains a wrong value
@ 2006-06-09 20:51 Emanuel Hilgart
  0 siblings, 0 replies; only message in thread
From: Emanuel Hilgart @ 2006-06-09 20:51 UTC (permalink / raw)
  To: linux-mm

I am not sure if this is a bug.

The return value of wait_table_bits(unsigned long size) is too large. 
hash_long(val,zone->wait_table_bits) exceeds the maximum array index of 
zone->wait_table.

mm/page_alloc.c
/*
 * This is an integer logarithm so that shifts can be used later
 * to extract the more random high bits from the multiplicative
 * hash function before the remainder is taken.
 */
static inline unsigned long wait_table_bits(unsigned long size)
{
        return ffz(~size);
}


assumption:  
   wait_table_size := 0x10

conclusion:
  wait_table_bits(0x10) = 5
  hash_long(val,5) = [ 0 ; 0x1f ]

--
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>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-09 20:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-06-09 20:51 zone->wait_table_bits contains a wrong value Emanuel Hilgart

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox