Re: [RFC 09/16] kgr: mark task_safe in some kthreads

From: Mike Galbraith
Date: Thu May 15 2014 - 01:04:33 EST


On Thu, 2014-05-15 at 00:50 -0400, Tejun Heo wrote:
> Hello, Mike.
>
> On Thu, May 15, 2014 at 06:46:18AM +0200, Mike Galbraith wrote:
> > > I think it'd be healthier to identify the use cases and then provide
> > > proper interface for it. Note that workqueue can now expose interface
> > > to modify concurrency, priority and cpumask to userland which
> > > writeback workers are already using.
> >
> > You can't identify a specific thing, any/all of it can land on the
> > user's diner plate, so he should be able to make the decisions. Power
> > to the user and all that, if he does something stupid, tuff titty. User
> > getting to call the shots, and getting to keep the pieces when he fscks
> > it all up is wonderful stuff, lets kernel people off the hook :)
>
> Do we know specific kthreads which need to be exposed with this way?

Soft/hard irq threads and anything having to do with IO mostly, which
including workqueues. I had to give the user a rather fugly global
prioritization option to let users more or less safely do the evil deeds
they want to and WILL do whether I agree with their motivation to do so
or not. I tell all users that realtime is real dangerous, but if they
want to do that, it's their box, so by definition perfectly fine.

> If there are good enough reasons for specific ones, sure, but I don't
> think "we can't change any of the kthreads because someone might be
> diddling with it" is something we can sustain in the long term.

I think the opposite. Taking any control the user has is pure evil.

-Mike

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/