lkml.org 
[lkml]   [2013]   [Dec]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] usermodehelper: kill ____call_usermodehelper()->set_cpus_allowed_ptr()
On Thu, Dec 05, 2013 at 03:37:45PM +0100, Oleg Nesterov wrote:
> On 12/05, Frederic Weisbecker wrote:
> >
> > 2013/11/28 Oleg Nesterov <oleg@redhat.com>:
> > > ____call_usermodehelper() does set_cpus_allowed_ptr(cpu_all_mask),
> > > this (and the comment) is misleading. We no longer have keventd_wq,
> > > and kmod.c switched to khelper_wq a long ago.
> > >
> > > And more importantly, "unlike our parent" is no longer true too,
> > > this thread was created by WQ_UNBOUND worker thread which has the
> > > full ->cpus_allowed mask, so this set_cpus_allowed_ptr() is simply
> > > unnecessary.
> > >
> > > Perhaps we will change this later, so that userspace can control
> > > the affinity of the usermode helper tasks, but this is yet another
> > > reason to remove this set_cpus_allowed_ptr().
> > >
> > > To some degree this also applies to set_user_nice(), but this
> > > patch only updates the comment.
> > >
> > > Signed-off-by: Oleg Nesterov <oleg@redhat.com>
> >
> > I'm adding Christophe in Cc because he is interested in tweaking the
> > affinity of call_usermodehelper for cpu isolation. This welcome
> > cleanup confirms that we want to take the direction of being able to
> > change the affinity of workqueue themselves instead of just
> > call_usermodehelper() alone.
>
> OK, but I'd like to remind just in case, as Tejun pointed out this
> patch is wrong ;)

Ok, I see that's because unboud workqueues are actually bound to NUMA nodes.
Doesn't that eventually work for call_usermodehelper() as well? Or may be there
are some reasons for it to keep a global affinity?

>
> And "change the affinity of workqueue themselves" is not simple, but
> we can make khelper_wq WQ_SYSFS.

Right it can be either user driven like through sysfs or some adaptive decision
taken by the kernel on top of full dynticks CPUs, etc...

But the sysfs interface based solution looks better from a quick POV.


\
 
 \ /
  Last update: 2013-12-05 16:01    [W:0.059 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site