Re: VM subsystem bug in 2.4.0 ?

Daniel Phillips
2001-01-09T16:48:48Z

"Stephen C. Tweedie" wrote:
> On Tue, Jan 09, 2001 at 04:45:10PM +0100, Christoph Rohland wrote:
> >
> > AFAIU mlock'ed pages would never get deactivated since the ptes do not
> > get dropped.
>
> D'oh, right --- so can't you lock a segment just by bumping page_count
> on its pages?

Putting this together with an idea from Linus:

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.

Call it 'pinned'... the pinned list would have pages with use count = 2
or more. A page gets off the pinned list when its use count goes to 1
in put_page.

--
Daniel