OpenCloudOS-Kernel/kernel/cgroup
Vlastimil Babka 5f155f27cb mm, cpuset: always use seqlock when changing task's nodemask
When updating task's mems_allowed and rebinding its mempolicy due to
cpuset's mems being changed, we currently only take the seqlock for
writing when either the task has a mempolicy, or the new mems has no
intersection with the old mems.

This should be enough to prevent a parallel allocation seeing no
available nodes, but the optimization is IMHO unnecessary (cpuset
updates should not be frequent), and we still potentially risk issues if
the intersection of new and old nodes has limited amount of
free/reclaimable memory.

Let's just use the seqlock for all tasks.

Link: http://lkml.kernel.org/r/20170517081140.30654-6-vbabka@suse.cz
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Anshuman Khandual <khandual@linux.vnet.ibm.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: David Rientjes <rientjes@google.com>
Cc: Dimitri Sivanich <sivanich@sgi.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2017-07-06 16:24:34 -07:00
..
Makefile cgroup: Move debug cgroup to its own file 2017-06-14 16:01:21 -04:00
cgroup-internal.h cgroup: Move debug cgroup to its own file 2017-06-14 16:01:21 -04:00
cgroup-v1.c cgroup: Move debug cgroup to its own file 2017-06-14 16:01:21 -04:00
cgroup.c cgroup: implement "nsdelegate" mount option 2017-06-28 14:45:21 -04:00
cpuset.c mm, cpuset: always use seqlock when changing task's nodemask 2017-07-06 16:24:34 -07:00
debug.c cgroup: fix lockdep warning in debug controller 2017-06-14 16:01:41 -04:00
freezer.c
namespace.c kernel: convert cgroup_namespace.count from atomic_t to refcount_t 2017-03-06 14:55:22 -05:00
pids.c cgroup/pids: remove spurious suspicious RCU usage warning 2017-03-06 15:11:29 -05:00
rdma.c rdmacg: Fixed uninitialized current resource usage 2017-01-10 12:52:32 -05:00