Re: swap cache

Jamie Lokier (lkd@tantalophile.demon.co.uk)
Wed, 16 Dec 1998 00:37:05 +0000


On Mon, Dec 14, 1998 at 05:48:42PM +0330, Muthu wrote:
> It mentions that swap cache usage it to avoid one more writing if it
> is already present in swap file. Can't this information derived from
> "dirty" bit of PTE (page table entires)?

Stephen Tweedie and all the others will explain better than I will, but
anyway: the swap cache allows *clean* pages to be in swap and memory at
the same time.

Without the swap cache, when we wanted to evict a *clean* page, we'd
have to write it to the swap file. With the cache, it may be present in
the swap file already and we just discard it from memory.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/