linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Emanuel Hilgart <emanuel@et-hilgart.de>
To: linux-mm@kvack.org
Subject: zone->wait_table_bits contains a wrong value
Date: Fri, 9 Jun 2006 22:51:55 +0200	[thread overview]
Message-ID: <200606092251.55231.emanuel@et-hilgart.de> (raw)

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>

                 reply	other threads:[~2006-06-09 20:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200606092251.55231.emanuel@et-hilgart.de \
    --to=emanuel@et-hilgart.de \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox