lkml.org 
[lkml]   [2011]   [Nov]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH 4/8] mm: compaction: defer compaction only with sync_migration
    On Sat, Nov 19, 2011 at 08:54:16PM +0100, Andrea Arcangeli wrote:
    > Let only sync migration drive the
    > compaction_deferred()/defer_compaction() logic. So sync migration
    > isn't prevented to run if async migration fails. Without sync
    > migration pages requiring migrate.c:writeout() or a ->migratepage
    > operation (that isn't migrate_page) can't me migrated, and that has
    > the effect of polluting the movable pageblock with pages that won't be
    > migrated by async migration, so it's fundamental to guarantee sync
    > compaction will be run too before failing.
    >
    > Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
    > ---
    > mm/page_alloc.c | 50 ++++++++++++++++++++++++++++++--------------------
    > 1 files changed, 30 insertions(+), 20 deletions(-)
    >
    > diff --git a/mm/page_alloc.c b/mm/page_alloc.c
    > index 9dd443d..2229f7d 100644
    > --- a/mm/page_alloc.c
    > +++ b/mm/page_alloc.c
    > @@ -1891,7 +1891,7 @@ __alloc_pages_direct_compact(gfp_t gfp_mask, unsigned int order,
    > {
    > struct page *page;
    >
    > - if (!order || compaction_deferred(preferred_zone))
    > + if (!order)
    > return NULL;
    >

    What is the motivation for moving the compation_deferred()
    check to __alloc_pages_slowpath()? If compaction was deferred
    for async compaction, we try direct reclaim as the linear isolation
    might succeed where compaction failed and compaction will likely be
    skipped again the second time around.

    If anything, entering direct reclaim for THP when compaction is deferred
    is wrong as it also potentially stalls for a long period of time
    in reclaim



    \
     
     \ /
      Last update: 2011-11-21 13:39    [from the cache]
    ©2003-2014 Jasper Spaans. hosted at Digital Ocean