[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Re: swapcache bug?



Hi,

On Sun, 07 Feb 1999 19:21:38 +0100, Manfred Spraul
<masp0008@stud.uni-sb.de> said:

> I'm currently debugging my physical memory ramdisk, and I see lots of
> entries in the page cache that have 'page->offset' which aren't
> multiples of 4096. (they are multiples of 256)
> All of them belong to swapper_inode.

That is normal.

> If this is the intended behaviour, then page_hash() should be changed:
> it assumes that 'page->offset' is a multiple of 4096.

Good point, the line include/linux/pagemap.h:39,

	return s(i+o) & (PAGE_HASH_SIZE-1);

should probably be 

	return s(i+o+offset) & (PAGE_HASH_SIZE-1);

to mix in the low order bits for swap entries.  Well spotted.  Anyone
see anything wrong with this one-liner change?

--Stephen
--
To unsubscribe, send a message with 'unsubscribe linux-mm my@address'
in the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://humbolt.geo.uu.nl/Linux-MM/