• T
    writeback: reset wb_domain->dirty_limit[_tstmp] when memcg domain size changes · 2529bb3a
    Tejun Heo 提交于
    The amount of available memory to a memcg wb_domain can change as
    memcg configuration changes.  A domain's ->dirty_limit exists to
    smooth out sudden drops in dirty threshold; however, when a domain's
    size actually drops significantly, it hinders the dirty throttling
    from adjusting to the new configuration leading to unexpected
    behaviors including unnecessary OOM kills.
    
    This patch resolves the issue by adding wb_domain_size_changed() which
    resets ->dirty_limit[_tstmp] and making memcg call it on configuration
    changes.
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Cc: Jens Axboe <axboe@kernel.dk>
    Cc: Jan Kara <jack@suse.cz>
    Cc: Wu Fengguang <fengguang.wu@intel.com>
    Cc: Greg Thelen <gthelen@google.com>
    Signed-off-by: NJens Axboe <axboe@fb.com>
    2529bb3a
memcontrol.c 151.4 KB