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


Groups > linux.kernel > #1727428

Re: [PATCH] cgroup/cpuset: remove circular dependency deadlock

From Waiman Long <longman@redhat.com>
Newsgroups linux.kernel
Subject Re: [PATCH] cgroup/cpuset: remove circular dependency deadlock
Date 2017-09-06 15:00 +0200
Message-ID <umI5Y-1TZ-35@gated-at.bofh.it> (permalink)
References <umH0d-1bN-13@gated-at.bofh.it>
Organization Red Hat

Show all headers | View raw


On 09/06/2017 07:48 AM, Prateek Sood wrote:
> Remove circular dependency deadlock in a scenario where hotplug of CPU is
> being done while there is updation in cgroup and cpuset triggered from
> userspace.
>
> Example scenario:
> kworker/0:0 => kthreadd => init:729 => init:1 => kworker/0:0
>
> kworker/0:0 - lock(cpuhotplug.mutex)  [held]
>               flush(work)   [no high prio workqueue available on CPU]
>               wait_for_completion()
>
> kthreadd    - percpu_down_read(cgroup_threadgroup_rwsem)  [waiting]
>
> init:729    - percpu_down_write(cgroup_threadgroup_rwsem)   [held]
>               lock(cpuset_mutex)   [waiting]
>
> init:1      - lock(cpuset_mutex)   [held]
>               lock(cpuhotplug.mutex)   [waiting]
>
> Eliminate this dependecy by reordering locking of cpuset_mutex
> and cpuhotplug.mutex in following order
> 1. Acquire cpuhotplug.mutex
> 2. Acquire cpuset_mutex
>
> Signed-off-by: Prateek Sood <prsood@codeaurora.org>

Is this patch for the latest upstream kernel or 4.4? There is no
cpuhotplug.mutex anymore in upstream kernel. It is a per-cpu rwsem
cpu_hotplug_lock.

Cheers,
Longman

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


Thread

[PATCH] cgroup/cpuset: remove circular dependency deadlock Prateek Sood <prsood@codeaurora.org> - 2017-09-06 13:50 +0200
  Re: [PATCH] cgroup/cpuset: remove circular dependency deadlock Waiman Long <longman@redhat.com> - 2017-09-06 15:00 +0200
    Re: [PATCH] cgroup/cpuset: remove circular dependency deadlock Prateek Sood <prsood@codeaurora.org> - 2017-09-06 16:30 +0200

csiph-web