Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1315074
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous |
| Date | 2016-01-22 16:30 +0100 |
| Message-ID | <qTLOY-5RS-43@gated-at.bofh.it> (permalink) |
| References | <qQOgi-6eV-7@gated-at.bofh.it> <qQWdP-3jT-7@gated-at.bofh.it> <qR79g-2OU-11@gated-at.bofh.it> <qRfJw-lq-3@gated-at.bofh.it> <qSI6L-2vl-21@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, Jan 19, 2016 at 12:18:41PM -0500, Tejun Heo wrote: > If "cpuset.memory_migrate" is set, when a process is moved from one > cpuset to another with a different memory node mask, pages in used by > the process are migrated to the new set of nodes. This was performed > synchronously in the ->attach() callback, which is synchronized > against process management. Recently, the synchronization was changed > from per-process rwsem to global percpu rwsem for simplicity and > optimization. > > Combined with the synchronous mm migration, this led to deadlocks > because mm migration could schedule a work item which may in turn try > to create a new worker blocking on the process management lock held > from cgroup process migration path. > > This heavy an operation shouldn't be performed synchronously from that > deep inside cgroup migration in the first place. This patch punts the > actual migration to an ordered workqueue and updates cgroup process > migration and cpuset config update paths to flush the workqueue after > all locks are released. This way, the operations still seem > synchronous to userland without entangling mm migration with process > management synchronization. CPU hotplug can also invoke mm migration > but there's no reason for it to wait for mm migrations and thus > doesn't synchronize against their completions. > > Signed-off-by: Tejun Heo <tj@kernel.org> > Reported-and-tested-by: Christian Borntraeger <borntraeger@de.ibm.com> > Cc: stable@vger.kernel.org # v4.4+ Applied to cgroup/for-4.5-fixes. Thanks. -- tejun
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: regression 4.4: deadlock in with cgroup percpu_rwsem Tejun Heo <tj@kernel.org> - 2016-01-15 17:50 +0100
[PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous Tejun Heo <tj@kernel.org> - 2016-01-19 18:20 +0100
Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous Christian Borntraeger <borntraeger@de.ibm.com> - 2016-01-22 15:30 +0100
Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous Tejun Heo <tj@kernel.org> - 2016-01-22 16:30 +0100
Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous Christian Borntraeger <borntraeger@de.ibm.com> - 2016-01-22 16:50 +0100
Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous Tejun Heo <tj@kernel.org> - 2016-01-22 16:50 +0100
Re: [PATCH cgroup/for-4.5-fixes] cpuset: make mm migration asynchronous Tejun Heo <tj@kernel.org> - 2016-01-22 16:30 +0100
csiph-web