[lkml]   [2011]   [Jul]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch] mm: thp: disable defrag for page faults per default
    Hello Johannes,

    On Mon, Jul 25, 2011 at 10:38:41PM +0200, Johannes Weiner wrote:
    > With defrag mode enabled per default, huge page allocations pass
    > __GFP_WAIT and may drop compaction into sync-mode where they wait for
    > pages under writeback.
    > I observe applications hang for several minutes(!) when they fault in
    > huge pages and compaction starts to wait on in-"flight" USB stick IO.
    > This patch disables defrag mode for page fault allocations unless the
    > VMA is madvised explicitely. Khugepaged will continue to allocate
    > with __GFP_WAIT per default, but stalls are not a problem of
    > application responsiveness there.

    Allocating memory without __GFP_WAIT means THP it's like disabled
    except when there's plenty of memory free after boot, even trying with
    __GFP_WAIT and without compaction would be better than that. We don't
    want to modify all apps, just a few special ones should have the
    madvise like qemu-kvm for example (for embedded in case there's
    embedded virt).

    If you want to make compaction and migrate run without ever dropping
    into sync-mode (or aborting if we've to wait on too many pages) I
    think it'd be a whole lot better.

    If you could show the SYSRQ+T during the minute wait it'd be
    interesting too.

    There was also some compaction bug that would lead to minutes of stall
    in congestion_wait, those are fixed in current kernels.

     \ /
      Last update: 2011-07-25 23:05    [W:0.026 / U:20.384 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site