lkml.org 
[lkml]   [2013]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [PATCH 12/13] mm: numa: Scan pages with elevated page_mapcount
    On Wed, Jul 03, 2013 at 08:35:17PM +0200, Peter Zijlstra wrote:
    > On Wed, Jul 03, 2013 at 03:21:39PM +0100, Mel Gorman wrote:
    > > Initial support for automatic NUMA balancing was unable to distinguish
    > > between false shared versus private pages except by ignoring pages with an
    > > elevated page_mapcount entirely. This patch kicks away the training wheels
    > > as initial support for identifying shared/private pages is now in place.
    > > Note that the patch still leaves shared, file-backed in VM_EXEC vmas in
    > > place guessing that these are shared library pages. Migrating them are
    > > likely to be of major benefit as generally the expectation would be that
    > > these are read-shared between caches and that iTLB and iCache pressure is
    > > generally low.
    >
    > This reminds me; there a clause in task_numa_work() that skips 'small' VMAs. I
    > don't see the point of that.
    >

    It was a stupid hack initially to keep scan rates down and it was on the
    TODO list to get rid of it and replace it with something else. I'll just
    get rid of it for now without the replacement. Patch looks like this.

    ---8<---
    sched: Remove check that skips small VMAs

    task_numa_work skips small VMAs. At the time the logic was to reduce the
    scanning overhead which was considerable. It is a dubious hack at best. It
    would make much more sense to cache where faults have been observed and
    only rescan those regions during subsequent PTE scans. Remove this hack
    as motivation to do it properly in the future.

    Signed-off-by: Mel Gorman <mgorman@suse.de>
    ---
    kernel/sched/fair.c | 4 ----
    1 file changed, 4 deletions(-)

    diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c
    index 3d34c6e..921265b 100644
    --- a/kernel/sched/fair.c
    +++ b/kernel/sched/fair.c
    @@ -1075,10 +1075,6 @@ void task_numa_work(struct callback_head *work)
    if (!vma_migratable(vma))
    continue;

    - /* Skip small VMAs. They are not likely to be of relevance */
    - if (vma->vm_end - vma->vm_start < HPAGE_SIZE)
    - continue;
    -
    do {
    start = max(start, vma->vm_start);
    end = ALIGN(start + (pages << PAGE_SHIFT), HPAGE_SIZE);

    \
     
     \ /
      Last update: 2013-07-04 11:41    [W:4.575 / U:0.100 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site