Messages in this thread | | | Date | Tue, 30 Jan 2001 23:01:49 -0800 | From | "Quim K Holland" <> | Subject | Re: 2.4.X inode cache bug |
| |
In <200101310202.EAA11357@smtp2.kolumbus.fi>, jukka.santala@kolumbus.fi writes:
> Excuse me for the lack of patch in this mail,... > In 2.4.x, linux/fs/inode.c has a hash() function with a small > slip-up. The inode hash-value is initialized with "unsigned > long tmp = i_ino | ((unsigned long) sb / L1_CACHE_BYTES);". > ... I believe this is a > slip-up, because you should NEVER use bitwise-or in a hash > formula. This creates a slanted distribution, and depending on > the address of the superblock block, can cause severe > inefficiency in the code. > Just replacing the | with ^ imroves hash-table efficiency > noticeably,...
Then maybe the attached patch is what you want? This also replaces `+' on the next line with `^' to avoid slanted distribution.
------------------------------------------------------------ --== Sent via Deja.com ==-- http://www.deja.com/
[unhandled content-type:application/octet-stream] | |