Re: [RFC][PATCH] lru_add_drain_all() don't use schedule_on_each_cpu()

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Lee Schermerhorn
Date: Tuesday, October 28, 2008 - 2:29 pm

On Tue, 2008-10-28 at 13:45 -0700, Andrew Morton wrote:

I believe that we still  have the lru_drain_all() called from the fault
path [with mmap_sem held] in clear_page_mlock().  We call
clear_page_mlock() on COW of an mlocked page in a VM_LOCKED vma to
ensure that we don't end up with an mlocked page in some other task's
non-VM_LOCKED vma where we'd then fail to munlock it later.  During
development testing, Rik encountered scenarios where a page would
encounter a COW fault while it was still making its way to the LRU via
the pagevecs.  So, he added the 'drain_all() and that seemed to avoid
this scenario.

Now, in the current upstream version of the unevictable mlocked pages
patches, we just count any mlocked pages [vmstat] that make their way to
free*page() instead of BUGging out, as we were doing earlier during
development.  So, maybe we can drop the lru_drain_add()s in the
unevictable mlocked pages work and live with the occasional freed
mlocked page, or mlocked page on the active/inactive lists to be dealt
with by vmscan.

Comments?

Lee




--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: mlock: mlocked pages are unevictable, Heiko Carstens, (Tue Oct 21, 8:13 am)
Re: mlock: mlocked pages are unevictable, KOSAKI Motohiro, (Tue Oct 21, 8:51 am)
Re: mlock: mlocked pages are unevictable, KOSAKI Motohiro, (Tue Oct 21, 10:18 am)
Re: mlock: mlocked pages are unevictable, Peter Zijlstra, (Tue Oct 21, 1:30 pm)
Re: mlock: mlocked pages are unevictable, Peter Zijlstra, (Tue Oct 21, 1:48 pm)
Re: mlock: mlocked pages are unevictable, Lee Schermerhorn, (Wed Oct 22, 8:28 am)
Re: [RFC][PATCH] lru_add_drain_all() don't use schedule_on ..., Christoph Lameter, (Tue Oct 28, 7:25 am)
Re: [RFC][PATCH] lru_add_drain_all() don't use schedule_on ..., Lee Schermerhorn, (Tue Oct 28, 2:29 pm)
Re: [RFC][PATCH] lru_add_drain_all() don't use schedule_on ..., KAMEZAWA Hiroyuki, (Wed Oct 29, 1:21 am)
[PATCH] get rid of lru_add_drain_all() in munlock path, KOSAKI Motohiro, (Wed Nov 5, 5:14 pm)
Re: [PATCH] get rid of lru_add_drain_all() in munlock path, Kamalesh Babulal, (Thu Nov 6, 9:33 am)