public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5] kmod: Cleanups, simplifications, and make isolation friendly v3
@ 2015-07-27 16:27 Frederic Weisbecker
  2015-07-27 16:27 ` [PATCH 1/5] kmod: Bunch of internal functions renames Frederic Weisbecker
                   ` (6 more replies)
  0 siblings, 7 replies; 12+ messages in thread
From: Frederic Weisbecker @ 2015-07-27 16:27 UTC (permalink / raw)
  To: LKML
  Cc: Frederic Weisbecker, Tejun Heo, Oleg Nesterov, Christoph Lameter,
	Rik van Riel, Andrew Morton

This patchset does a bunch of cleanups and converts khelper to use
system unbound workqueues. The 3 first patches should be uncontroversial.
The last 2 patches are debatable.

Kmod creates kernel threads that perform userspace jobs and we want
those to have a large affinity in order not to contend busy CPUs. This
is (partly) why we use khelper which has a wide affinity that the kernel
threads it create can inherit from. Now khelper is a dedicated workqueue
that has singlethread properties which we aren't interested in.

Hence those two debatable changes:

_ We would like to use generic workqueues. System unbound workqueues are
  a very good candidate but they are not wide affine, only node affine.
  Now probably a node is enough to perform many parallel kmod jobs.

_ We would like to remove the wait_for_helper kernel thread (UMH_WAIT_PROC
  handler) to use the workqueue. It means that if the workqueue blocks,
  and no other worker can take pending kmod request, we can be screwed.
  Now if we have 512 threads, this should be enough.

I added Tejun to discuss these things.

Changes since v2, after Oleg reviews:

* Reordered patches such that the uncontroversial patches begin the
  queue and can be applied independantly.

* Tell about the need for workqueue also because we want a privileged
  (root) thread for usermodehelper job.

* Deactivate signal after UMH_WAIT_PROC handler.

* Update comment to handle the fact system unbound workqueues are node
  affine and not wide affine.

---
git://git.kernel.org/pub/scm/linux/kernel/git/frederic/linux-dynticks.git
	nohz/kmod-v3

HEAD: 470ed6f10191864d28d2c8f4fd8a349ef58f427b

Thanks,
	Frederic
---

Frederic Weisbecker (5):
      kmod: Bunch of internal functions renames
      kmod: Remove unecessary explicit wide CPU affinity setting
      kmod: Add up-to-date explanations on the purpose of each asynchronous levels
      kmod: Use system_unbound_wq instead of khelper
      kmod: Handle UMH_WAIT_PROC from system unbound workqueue


 include/linux/kmod.h |  2 --
 init/main.c          |  1 -
 kernel/kmod.c        | 91 ++++++++++++++++++++++++++++------------------------
 3 files changed, 49 insertions(+), 45 deletions(-)

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2015-08-05 22:14 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-27 16:27 [PATCH 0/5] kmod: Cleanups, simplifications, and make isolation friendly v3 Frederic Weisbecker
2015-07-27 16:27 ` [PATCH 1/5] kmod: Bunch of internal functions renames Frederic Weisbecker
2015-07-27 16:27 ` [PATCH 2/5] kmod: Remove unecessary explicit wide CPU affinity setting Frederic Weisbecker
2015-07-27 16:27 ` [PATCH 3/5] kmod: Add up-to-date explanations on the purpose of each asynchronous levels Frederic Weisbecker
2015-07-27 16:27 ` [PATCH 4/5] kmod: Use system_unbound_wq instead of khelper Frederic Weisbecker
2015-07-27 16:27 ` [PATCH 5/5] kmod: Handle UMH_WAIT_PROC from system unbound workqueue Frederic Weisbecker
2015-07-27 18:48 ` [PATCH 0/5] kmod: Cleanups, simplifications, and make isolation friendly v3 Tejun Heo
2015-07-27 21:05   ` Frederic Weisbecker
2015-07-28 18:01     ` Tejun Heo
2015-07-28 18:07       ` Frederic Weisbecker
2015-08-05 17:10 ` Oleg Nesterov
2015-08-05 22:14   ` Frederic Weisbecker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox