Re: [RFC PATCH] mm/slub: fix a deadlock due to incomplete patching of cpusets_enabled()

2017-07-26 Thread Dima Zavin
On Wed, Jul 26, 2017 at 10:02 AM, Christopher Lameter wrote: > On Wed, 26 Jul 2017, Dima Zavin wrote: > >> The fix is to cache the value that's returned by cpusets_enabled() at the >> top of the loop, and only operate on the seqlock (both begin and retry) if >> it was true. > > I think the proper

Re: [RFC PATCH] mm/slub: fix a deadlock due to incomplete patching of cpusets_enabled()

2017-07-26 Thread Christopher Lameter
On Wed, 26 Jul 2017, Dima Zavin wrote: > The fix is to cache the value that's returned by cpusets_enabled() at the > top of the loop, and only operate on the seqlock (both begin and retry) if > it was true. I think the proper fix would be to ensure that the calls to read_mems_allowed_{begin,retry

[RFC PATCH] mm/slub: fix a deadlock due to incomplete patching of cpusets_enabled()

2017-07-26 Thread Dima Zavin
In codepaths that use the begin/retry interface for reading mems_allowed_seq with irqs disabled, there exists a race condition that stalls the patch process after only modifying a subset of the static_branch call sites. This problem manifested itself as a dead lock in the slub allocator, inside ge