Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1561404

Re: [RFC 2/4] mm, page_alloc: fix fast-path race with cpuset update or removal

From Mel Gorman <mgorman@techsingularity.net>
Newsgroups linux.kernel
Subject Re: [RFC 2/4] mm, page_alloc: fix fast-path race with cpuset update or removal
Date 2017-01-18 10:50 +0100
Message-ID <t0V2p-2ja-13@gated-at.bofh.it> (permalink)
References <t0LZ8-5nf-33@gated-at.bofh.it> <t0M8O-5qs-9@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, Jan 17, 2017 at 11:16:08PM +0100, Vlastimil Babka wrote:
> Ganapatrao Kulkarni reported that the LTP test cpuset01 in stress mode triggers
> OOM killer in few seconds, despite lots of free memory. The test attemps to
> repeatedly fault in memory in one process in a cpuset, while changing allowed
> nodes of the cpuset between 0 and 1 in another process.
> 
> One possible cause is that in the fast path we find the preferred zoneref
> according to current mems_allowed, so that it points to the middle of the
> zonelist, skipping e.g. zones of node 1 completely. If the mems_allowed is
> updated to contain only node 1, we never reach it in the zonelist, and trigger
> OOM before checking the cpuset_mems_cookie.
> 
> This patch fixes the particular case by redoing the preferred zoneref search
> if we switch back to the original nodemask. The condition is also slightly
> changed so that when the last non-root cpuset is removed, we don't miss it.
> 
> Note that this is not a full fix, and more patches will follow.
> 
> Reported-by: Ganapatrao Kulkarni <gpkulkarni@gmail.com>
> Fixes: 682a3385e773 ("mm, page_alloc: inline the fast path of the zonelist iterator")
> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>

Acked-by: Mel Gorman <mgorman@techsingularity.net>

-- 
Mel Gorman
SUSE Labs

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[RFC 0/4] fix premature OOM due to cpuset races Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 01:10 +0100
  [RFC 4/4] mm, page_alloc: fix premature OOM when racing with cpuset mems update Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 01:10 +0100
    Re: [RFC 4/4] mm, page_alloc: fix premature OOM when racing with cpuset mems update "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-01-18 08:20 +0100
      Re: [RFC 4/4] mm, page_alloc: fix premature OOM when racing with  cpuset mems update Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 10:40 +0100
    Re: [RFC 4/4] mm, page_alloc: fix premature OOM when racing with  cpuset mems update Mel Gorman <mgorman@techsingularity.net> - 2017-01-18 11:20 +0100
  [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to slowpath Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 01:20 +0100
    Re: [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to slowpath "Hillf Danton" <hillf.zj@alibaba-inc.com> - 2017-01-18 08:40 +0100
      Re: [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to  slowpath Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 10:30 +0100
    Re: [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to  slowpath Mel Gorman <mgorman@techsingularity.net> - 2017-01-18 11:10 +0100
    Re: [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to  slowpath Michal Hocko <mhocko@kernel.org> - 2017-01-18 11:10 +0100
      Re: [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to  slowpath Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 11:10 +0100
        Re: [RFC 3/4] mm, page_alloc: move cpuset seqcount checking to  slowpath Michal Hocko <mhocko@kernel.org> - 2017-01-18 11:20 +0100
  [RFC 2/4] mm, page_alloc: fix fast-path race with cpuset update or removal Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 01:20 +0100
    Re: [RFC 2/4] mm, page_alloc: fix fast-path race with cpuset update  or removal Michal Hocko <mhocko@kernel.org> - 2017-01-18 10:40 +0100
    Re: [RFC 2/4] mm, page_alloc: fix fast-path race with cpuset update  or removal Mel Gorman <mgorman@techsingularity.net> - 2017-01-18 10:50 +0100
  Re: [RFC 0/4] fix premature OOM due to cpuset races Michal Hocko <mhocko@kernel.org> - 2017-01-18 10:40 +0100
  [RFC 5/4] mm, page_alloc: fix premature OOM due to vma mempolicy  update Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 17:30 +0100
    Re: [RFC 5/4] mm, page_alloc: fix premature OOM due to vma mempolicy  update Vlastimil Babka <vbabka@suse.cz> - 2017-01-18 17:30 +0100

csiph-web