Re: [PATCH] Update Unevictable LRU and Mlocked Pages documentation

Lee Schermerhorn
2008-07-31T14:43:49Z

On Thu, 2008-07-31 at 09:14 -0500, Christoph Lameter wrote:
> > +Why maintain unevictable pages on an additional LRU list? Primarily because
> > +we want to be able to migrate unevictable pages between nodes--for memory
> > +deframentation, workload management and memory hotplug. The linux kernel can
> > +only migrate pages that it can successfully isolate from the lru lists.
> > +Therefore, we want to keep the unevictable pages on an lru-like list, where
> > +they can be found by isolate_lru_page().
>
> The primary motivation for me was to get rid of the useless scanning
> of pages under memory pressure which led to live lock scenarios.
> mlocked pages are migratable now so the changes do not really change
> anything there. The unevictable lists are also necessary to spill
> pages back to the regular LRUs when unevictable pages become evictable
> again.

Hi, Christoph:

Yes, mlocked pages are migratable now [before the unevictable
lru/mlocked pages patches], but that's because they reside on the LRU
lists. If we just moved them off to a list that isn't known to
isolate_lru_page(), it wouldn't find them and they wouldn't be migrated.
So, I want to keep them on an LRU-like list so that they remain
migratable. I was just explaining that rationale in the doc.

Thanks for reviewing,
Lee