• David Gibson's avatar
    [PATCH] ppc64: change bad choice of VSID_MULTIPLIER · 2c2d4b3f
    David Gibson authored
    We recently changed the VSID allocation on PPC64 to use a new scheme
    based on a multiplicative hash.  It turns out our choice of multiplier
    (the largest 28-bit prime) wasn't so great: with large contiguous
    mappings, we can get very poor hash scattering.  In particular earlier
    machines (without 16M pages) which had a reasonable about of RAM (>2G
    or so) wouldn't boot, because the linear mapping overflowed some hash
    buckets.
    
    This patch changes the multiplier to something which seems to work
    better (it is, rather arbitrarily, the median of the primes between
    2^27 and 2^28).  Some more theory should almost certainly go into the
    choice of this constant, to avoid more pathological cases.  But for
    now, this choice fixes a serious bug, and seems to do at least as well
    at scattering as the old choice on a handful of simple testcases.
    Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
    2c2d4b3f
head.S 54 KB