Re: VM subsystem bug in 2.4.0 ?

Rik van Riel
2001-01-08T18:31:07Z

On Mon, 8 Jan 2001, Linus Torvalds wrote:
> On Mon, 8 Jan 2001, Rik van Riel wrote:
> >
> > We need a check in deactivate_page() to prevent the kernel
> > from moving pages from locked shared memory segments to the
> > inactive_dirty list.
> >
> > Christoph? Linus?
>
> The only solution I see is something like a "active_immobile"
> list, and add entries to that list whenever "writepage()"
> returns 1 - instead of just moving them to the active list.
>
> Seems to be a simple enough change. The main worry would be
> getting the pages _off_ such a list:

Just marking them with a special "do not deactivate me"
bit seems to work fine enough. When this special bit is
set, we simply move the page to the back of the active
list instead of deactivating.

And when the bit changes again, the page can be evicted
from memory just fine. In the mean time, the locked pages
will also have undergone normal page aging and at unlock
time we know whether to swap out the page or not.

I agree that this scheme has a higher overhead than your
idea, but it also seems to be a bit more flexible and
simple. Alternatively, we could just scan the wired_list
once a minute and move the unwired pages to the active
list.

regards,

Rik
--
Virtual memory is like a game you can't win;
However, without VM there's truly nothing to lose...

http://www.surriel.com/
http://www.conectiva.com/ http://distro.conectiva.com.br/