Re: VM subsystem bug in 2.4.0 ?

From: Linus Torvalds (torvalds@transmeta.com)
Date: Tue Jan 09 2001 - 13:23:36 EST


On Tue, 9 Jan 2001, Stephen C. Tweedie wrote:
>
> But again, how do you clear the bit? Locking is a per-vma property,
> not per-page. I can mmap a file twice and mlock just one of the
> mappings. If you get a munlock(), how are you to know how many other
> locked mappings still exist?

Note that this would be solved very cleanly if the SHM code would use the
"VM_LOCKED" flag, and actually lock the pages in the VM, instead of trying
to lock them down for writepage().

That would mean that such a segment would still get swapped out when it is
not mapped anywhere, but I wonder if that semantic difference really
matters.

If the vma is marked VM_LOCKED, the VM subsystem will do the right thing
(the page will never get removed from the page tables, so it won't ever
make it into that back-and-forth bounce between the active and the
inactive lists).

                Linus

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



This archive was generated by hypermail 2b29 : Mon Jan 15 2001 - 21:00:22 EST