Re: [patch 2/13] remove pages from the LRU in __free_pages_ok()

Rik van Riel
2002-07-29T08:35:16Z

On Sun, 28 Jul 2002, Linus Torvalds wrote:

> And for anonymous pages, I really think that the right solution is to do
> the same remove-from-LRU thing for the "last unmap" (which should be
> trivial to notice with rmap).

Unfortunately it isn't, because the whole thing occurs because
of a race between truncate and the page fault path. Whatever
check we do, it's still possible for the race to hit us.

This is because vmtruncate walks the mms one by one, so the mms
already passed by vmtruncate can still fault in the not yet
truncated pages from the file. I've stared at this thing for a
while and didn't come up with a way to prevent this, but maybe
somebody will find it ;)

> Which may imply that Andrew's irq-safe LRU list is the right thing to do
> after all.

According to Andrew it actually increases performance so it
doesn't seem as bad as it sounds.

regards,

Rik
--
Bravely reimplemented by the knights who say "NIH".

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