From: Tejun Heo <tj@kernel.org>
To: Wen Yang <wen.yang99@zte.com.cn>
Cc: zhong.weidong@zte.com.cn, Jiang Biao <jiang.biao2@zte.com.cn>,
Tan Hu <tan.hu@zte.com.cn>,
Lai Jiangshan <jiangshanlai@gmail.com>,
kernel test robot <xiaolong.ye@intel.com>,
linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH v3] workqueue: Introduce a way to set percpu worker_pool's scheduler
Date: Tue, 23 Jan 2018 06:30:07 -0800 [thread overview]
Message-ID: <20180123143007.GD1771050@devbig577.frc2.facebook.com> (raw)
In-Reply-To: <1516705242-30349-1-git-send-email-wen.yang99@zte.com.cn>
Hello,
On Tue, Jan 23, 2018 at 07:00:42PM +0800, Wen Yang wrote:
...
> This patch introduces a way to set the scheduler(policy and priority)
> of percpu worker_pool, in that way, user could set proper scheduler
> policy and priority of the worker_pool as needed, which could apply
> to all the WORK_CPU_BOUND workers on the same CPU. On the other hand,
> we could using /sys/devices/virtual/workqueue/cpumask for
> WORK_CPU_UNBOUND workers to prevent them starving.
The general approach looks good to me but this is way too big a patch.
Can you please split it so that the following steps are separate?
* Rename system workqueues.
* Expose attrs for system workqueues.
* Rename unbound_attrs to attrs.
* Convert ->nice to ->sched_attrs.
* Add scheduling policy to the exposed attrs.
And one nit below.
> +static int wq_parse_sched_attr(const char *ubuf, size_t count,
> + struct sched_attr *sched)
> +{
> + char buf[SCHED_ATTR_BUF_SIZE];
> + char *sptr, *token;
> + size_t len;
> +
> + memset(buf, 0, sizeof(buf));
> + len = min(count, (size_t)(sizeof(buf) - 1));
> + strncpy(buf, ubuf, len);
> + buf[len] = 0;
> + sptr = buf;
Can't we just do sscanf?
Thanks.
--
tejun
prev parent reply other threads:[~2018-01-23 14:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 11:00 [RFC PATCH v3] workqueue: Introduce a way to set percpu worker_pool's scheduler Wen Yang
2018-01-23 14:30 ` Tejun Heo [this message]
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=20180123143007.GD1771050@devbig577.frc2.facebook.com \
--to=tj@kernel.org \
--cc=jiang.biao2@zte.com.cn \
--cc=jiangshanlai@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tan.hu@zte.com.cn \
--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