Re: [RFC PATCH V5 5/5] workqueue: introduce a way to set workqueue's scheduler

From: Mike Galbraith
Date: Sun Jan 28 2018 - 23:41:54 EST


On Mon, 2018-01-29 at 12:15 +0800, Lai Jiangshan wrote:
> I think adding priority boost to workqueue(flush_work()) is the best
> way to fix the problem.

I disagree, priority boosting is needlessly invasive, takes control out
of user hands. The kernel wanting to run a workqueue does not justify
perturbing the user's critical task.

I think "give userspace rope" is always the best option, how rope is
used is none of our business.  Giving the user a means to draw a simple
line in the sand, above which they run only critical stuff, below
which, they can do whatever they want, sane in our opinions or not,
lets users do whatever craziness they want/need to do, and puts the
responsibility for consequences squarely on the right set of shoulders.

-Mike