From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 4/5] workqueue: don't expose workqueue_attrs to users
Date: Wed, 13 May 2015 09:52:54 -0400 [thread overview]
Message-ID: <20150513135254.GQ11388@htj.duckdns.org> (raw)
In-Reply-To: <5552AC37.8000809@cn.fujitsu.com>
Hello, Lai.
On Wed, May 13, 2015 at 09:43:19AM +0800, Lai Jiangshan wrote:
> >> I think the workqueue.c has too much complicated and rarely used APIs
> >> and exposes too much in this way. No one can set the nice value
> >> and the cpuallowed of a task atomically.
> >
> > What do you mean no one can?
>
> normal/general task. not kworker.
>
> no one can set the nice value and the cpumallowed of a normal task atomically.
>
> The kernel doesn't have such APIs:
>
> lock_and_get_task_cpus_allowed(task);
> /* modify cpumask */
> set_cpus_allowed_ptr_and_unlock();
I'm still not following. What are you trying to say?
> > So, we're now requiring workqueue users to take care of
> > synchronization, disabling and reinstating WQ_SYSFS (what if userland
> > hits those knobs at the same time?)
>
> I think there is no userland knobs when !WQ_SYSFS.
So, fail apply attrs calls if the workqueue is exposed to userland?
Are you serious?
> > and poking into workqueue struct to determine the current values of the
>
> I think the copy version of cpumask, nice, numa values are same as
> the workqueue struct have. No poking is required.
> (Its own lock-protect-region is the ONLY entry to call apply_workqueue_attrs()).
And how would the caller know the current values?
Thanks.
--
tejun
next prev parent reply other threads:[~2015-05-13 13:53 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-11 9:35 [PATCH 0/5] workqueue: cleanup for apply_workqueue_attrs() Lai Jiangshan
2015-05-11 9:35 ` [PATCH 1/5] workqueue: wq_pool_mutex protects the attrs-installation Lai Jiangshan
2015-05-11 12:23 ` Tejun Heo
2016-03-10 21:44 ` Steven Rostedt
2016-03-11 17:50 ` Tejun Heo
2016-07-11 20:50 ` Steven Rostedt
2016-07-12 15:09 ` Tejun Heo
2016-07-12 15:20 ` Tejun Heo
2016-07-12 15:23 ` Steven Rostedt
2015-05-11 9:35 ` [PATCH 2/5] workqueue: merge the similar code Lai Jiangshan
2015-05-11 14:31 ` Tejun Heo
2015-05-12 2:03 ` Lai Jiangshan
2015-05-12 13:16 ` Tejun Heo
2015-05-11 9:35 ` [PATCH 3/5] workqueue: ensure attrs-changing be sequentially Lai Jiangshan
2015-05-11 14:55 ` Tejun Heo
2015-05-12 5:09 ` Lai Jiangshan
2015-05-12 13:19 ` Tejun Heo
2015-05-11 9:35 ` [PATCH 4/5] workqueue: don't expose workqueue_attrs to users Lai Jiangshan
2015-05-11 14:59 ` Tejun Heo
2015-05-12 2:15 ` Lai Jiangshan
2015-05-12 13:22 ` Tejun Heo
2015-05-13 1:43 ` Lai Jiangshan
2015-05-13 13:52 ` Tejun Heo [this message]
2015-05-11 9:35 ` [PATCH 5/5] workqueue: remove no_numa from workqueue_attrs Lai Jiangshan
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=20150513135254.GQ11388@htj.duckdns.org \
--to=tj@kernel.org \
--cc=laijs@cn.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
/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
all inboxes | Powered by JetHome®