Re: [patch] 'sticky pages' support in the VM, futex-2.5.38-C5

Linus Torvalds (torvalds@transmeta.com)
Thu, 26 Sep 2002 15:32:50 -0700 (PDT)


On Thu, 26 Sep 2002, Andrew Morton wrote:
> Ingo Molnar wrote:
> >
> > ...
> > another implementation would be an idea from Linus: the page's lru list
> > pointer can in theory be used for pinned pages (pinned pages do not have
> > much LRU meaning anyway), and this pointer could specify the 'owner' MM of
> > the physical page. The COW fault handler then checks the sticky page:
>
> Overloading page->lru in this way is tricky. If we can guarantee
> that the page is anonymous (anonymise it if it's file-backed, pull
> it out of swapcache) then fine, ->mapping, ->list.next, ->list.prev,
> ->index and ->private are available.
>
> Can we do that?

Well, we have two situations:
- the page is shared. In which case we don't need to put it on any
pinning list, since the very sharedness of the page means that we won't
be COW'ing it in this address space.
- the page is private. In which case we can (and should) pre-COW it and
make it anonymous at futex time.

So yeah, it should be doable.

Not pretty.

Linus

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