]> git.baikalelectronics.ru Git - kernel.git/commit
cpuset: convert callback_mutex to a spinlock
authorVladimir Davydov <vdavydov@parallels.com>
Mon, 20 Oct 2014 11:50:29 +0000 (15:50 +0400)
committerTejun Heo <tj@kernel.org>
Mon, 27 Oct 2014 15:15:26 +0000 (11:15 -0400)
commitbe5e8388a92786e3144f23959cfec0637b8455b1
treeb670f05f0983a7705c58a97c4122f4963e4f840a
parent762e338c222828819464e5c2404c73e974ed3257
cpuset: convert callback_mutex to a spinlock

The callback_mutex is only used to synchronize reads/updates of cpusets'
flags and cpu/node masks. These operations should always proceed fast so
there's no reason why we can't use a spinlock instead of the mutex.

Converting the callback_mutex into a spinlock will let us call
cpuset_zone_allowed_softwall from atomic context. This, in turn, makes
it possible to simplify the code by merging the hardwall and asoftwall
checks into the same function, which is the business of the next patch.

Suggested-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Acked-by: Christoph Lameter <cl@linux.com>
Acked-by: Zefan Li <lizefan@huawei.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
kernel/cpuset.c