All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <fweisbec@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Christoph Lameter <cl@linux.com>,
	Mike Galbraith <bitbucket@online.de>,
	Thomas Gleixner <tglx@linutronix.de>,
	Gilad Ben-Yossef <gilad@benyossef.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Mike Frysinger <vapier@gentoo.org>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH] kmod: Run usermodehelpers only on cpus allowed for kthreadd V2
Date: Tue, 8 Apr 2014 23:56:00 +0200	[thread overview]
Message-ID: <20140408215556.GB14519@localhost.localdomain> (raw)
In-Reply-To: <20140408135712.c761d7b01bd451be5fc41c00@linux-foundation.org>

On Tue, Apr 08, 2014 at 01:57:12PM -0700, Andrew Morton wrote:
> On Fri, 8 Nov 2013 21:06:22 +0100 Frederic Weisbecker <fweisbec@gmail.com> wrote:
> 
> > On Fri, Nov 08, 2013 at 07:52:37PM +0000, Christoph Lameter wrote:
> > > On Fri, 8 Nov 2013, Frederic Weisbecker wrote:
> > > 
> > > > I understand, but why not solving that from the workqueue affinity? We want to
> > > > solve the issue of unbound workqueues in CPU isolation anyway.
> > > 
> > > Sure if you can solve that with an unbound work queue then this patch is
> > > not needed. Do you have a patch that addresses this issue in your
> > > patchset?
> > 
> > No. Sorry.
> > 
> 
> Several months have passed and nothgin has happened.  Any thoughts on
> what we should do with Christoph's patch?

We have taken another direction to solve the initial problem which is
that usermodehelper threads disturb CPUs on some workloads requiring isolation
(ie: workloads that want specific CPUs to not be disturbed by kernel noise)

We eventually agreed that setting the WQ_SYSFS flag to the usermodehelper
workqueue would allow us to control the affinity of these jobs through sysfs.

But eventually I took it one step further by considering that the real problem
is much broader and concerns all unbound workqueues. Not just usermodehelper.
Christoph finds usermodehelper workqueue disturbing on his workloads, but other
CPU isolation users runnning other workloads on other hardware, other IO protocols, etc..
may be disturbed by many other kind of unbound workqueues. Because unbound
workqueues are globally affined and this behaviour can't be tweaked sanely yet.

And there are a big lot of them. Singlethread workqueues for example has more
than 200 users in the kernel:

      $ git grep create_singlethread_workqueue | wc -l
        219

It's actually something that we wanted to fix for a while now. So I'm
currently working on a more general solution that allow users to affine all
unbound workqueues to the desired set of CPUs.

The last version of the patchset is https://lkml.org/lkml/2014/3/27/246
After some discussion with Tejun and others, I'm working on the next iteration.

So I strongly think we should drop Christoph's patch and focus on the
unbound workqueues sysfs' affinity interface patchset.

Ah there is also the problem of this explicit call in kmod:

       "set_cpus_allowed_ptr(current, cpu_all_mask);"

But it looks like something we can drop. The comment above says:

       /* We can run anywhere, unlike our parent keventd(). */

Looks like a stale issue that concerned the old workqueue times when workqueues
really mapped to named thread. But even then I don't see the reason for this
affinity overwrite.

Thanks.

  reply	other threads:[~2014-04-08 21:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-16 14:44 [PATCH] kmod: Run usermodehelpers only on cpus allowed for kthreadd Christoph Lameter
2013-10-16 21:13 ` Andrew Morton
2013-10-16 22:37   ` Christoph Lameter
2013-10-17 19:23     ` Andrew Morton
2013-11-07 16:43       ` [PATCH] kmod: Run usermodehelpers only on cpus allowed for kthreadd V2 Christoph Lameter
2013-11-07 22:50         ` Frederic Weisbecker
2013-11-08 15:06           ` Christoph Lameter
2013-11-08 16:31             ` Frederic Weisbecker
2013-11-08 17:05               ` Christoph Lameter
2013-11-08 19:12                 ` Frederic Weisbecker
2013-11-08 19:52                   ` Christoph Lameter
2013-11-08 20:06                     ` Frederic Weisbecker
2014-04-08 20:57                       ` Andrew Morton
2014-04-08 21:56                         ` Frederic Weisbecker [this message]
2013-10-17 13:55 ` [PATCH] kmod: Run usermodehelpers only on cpus allowed for kthreadd Frederic Weisbecker
2013-10-17 15:24   ` Christoph Lameter
2013-10-17 16:07     ` Frederic Weisbecker
2013-10-17 17:50       ` Andrew Morton
2013-10-17 18:24         ` Christoph Lameter
2013-10-17 22:27         ` Frederic Weisbecker
2013-10-20 18:00           ` Christoph Lameter
2013-10-17 18:23       ` Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140408215556.GB14519@localhost.localdomain \
    --to=fweisbec@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=bitbucket@online.de \
    --cc=cl@linux.com \
    --cc=gilad@benyossef.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=vapier@gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.