Re: [PATCH] VM kswapd autotuning vs. -ac7

Stephen C. Tweedie
2000-06-07T14:43:50Z

Hi,

On Wed, Jun 07, 2000 at 04:29:15PM +0200, Christoph Rohland wrote:

> > 2) we need to be able to swap out shm pages (maybe just
> > call a page->mapping->swapout() function?) by knowing just
> > the page
>
> This is not that easy. I need a backreference to the shm segment and
> the index into it to be able to note the new pte entry. Do you know
> where we could put these?

It's also trivial: just maintain a struct address_space for each
shm segment, and put the shm segment address in the address_space->
host field. Index each shm page against that address_space and
the VM will be able to find you for any callbacks it needs to make,
and you will be able to find the shm segment from that.

Cheers,
Stephen