From: Mike Galbraith <efault@gmx.de>
To: wen.yang99@zte.com.cn
Cc: tj@kernel.org, zhong.weidong@zte.com.cn, jiang.biao2@zte.com.cn,
tan.hu@zte.com.cn, jiangshanlai@gmail.com, xiaolong.ye@intel.com,
linux-kernel@vger.kernel.org
Subject: Re: 答复: Re: [RFC PATCH V5 5/5] workqueue: introduce a way to setworkqueue's scheduler
Date: Mon, 29 Jan 2018 07:31:42 +0100 [thread overview]
Message-ID: <1517207502.7290.53.camel@gmx.de> (raw)
In-Reply-To: <201801291350022080675@zte.com.cn>
On Mon, 2018-01-29 at 13:50 +0800, wen.yang99@zte.com.cn wrote:
>
> > What happens when a new kworker needs to be spawned?
> create_worker -> worker_attach_to_pool, in the function
> worker_attach_to_pool, we add this chunk:
>
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -1699,6 +1699,7 @@ static void worker_attach_to_pool(struct worker *worker,
> * online CPUs. It'll be re-applied when any of the CPUs come up.
> */
> set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask);
> + sched_setattr(worker->task, &pool->attrs->sched_attr);
>
> /*
> * The pool->attach_mutex ensures %POOL_DISASSOCIATED remains
>
> pool->attach_mutex may guarante it, add sched_setattr may apply the
> wq's sched_attr to the spawned kworer.
That doesn't help kthreadd get to a CPU in a box being saturated by RT.
As long as you are careful, it's not a problem, I just mentioned it
because it's a hole.
-Mike
parent reply other threads:[~2018-01-29 6:32 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <201801291350022080675@zte.com.cn>]
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=1517207502.7290.53.camel@gmx.de \
--to=efault@gmx.de \
--cc=jiang.biao2@zte.com.cn \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tan.hu@zte.com.cn \
--cc=tj@kernel.org \
--cc=wen.yang99@zte.com.cn \
--cc=xiaolong.ye@intel.com \
--cc=zhong.weidong@zte.com.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox