From: Tejun Heo <tj@kernel.org>
To: Lai Jiangshan <laijs@cn.fujitsu.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/2 tj/for-3.10] workqueue: add wq->freezing and remove POOL_FREEZING
Date: Mon, 1 Apr 2013 11:44:02 -0700 [thread overview]
Message-ID: <20130401184402.GA31435@htj.dyndns.org> (raw)
In-Reply-To: <1364660955-5217-1-git-send-email-laijs@cn.fujitsu.com>
On Sun, Mar 31, 2013 at 12:29:14AM +0800, Lai Jiangshan wrote:
> freezing is nothing related to pools, but POOL_FREEZING adds a connection,
> and causes freeze_workqueues_begin() and thaw_workqueues() complicated.
>
> Since freezing is workqueue instance attribute, so we introduce wq->freezing
> instead and remove POOL_FREEZING.
>
> Signed-off-by: Lai Jiangshan <laijs@cn.fujitsu.com>
> ---
> kernel/workqueue.c | 33 +++++++--------------------------
> 1 files changed, 7 insertions(+), 26 deletions(-)
>
> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
> index 04a8b98..6b7e5a4 100644
> --- a/kernel/workqueue.c
> +++ b/kernel/workqueue.c
> @@ -66,7 +66,6 @@ enum {
> */
> POOL_MANAGE_WORKERS = 1 << 0, /* need to manage workers */
> POOL_DISASSOCIATED = 1 << 2, /* cpu can't serve workers */
> - POOL_FREEZING = 1 << 3, /* freeze in progress */
>
> /* worker flags */
> WORKER_STARTED = 1 << 0, /* started */
> @@ -241,6 +240,7 @@ struct workqueue_struct {
>
> int nr_drainers; /* WQ: drain in progress */
> int saved_max_active; /* WQ: saved pwq max_active */
> + bool freezing; /* WQ: the wq is freezing */
Why not use another internal flag? There already are __WQ_DRAINING
and __WQ_ORDERED. Can't we just add __WQ_FREEZING?
Thanks.
--
tejun
next prev parent reply other threads:[~2013-04-01 18:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-30 16:29 Lai Jiangshan
2013-03-30 16:29 ` [PATCH 2/2 tj/for-3.10] workqueue: modify wq->freezing only when freezable Lai Jiangshan
2013-04-01 18:44 ` Tejun Heo [this message]
2013-04-02 2:17 ` [PATCH 1/2 tj/for-3.10] workqueue: add wq->freezing and remove POOL_FREEZING Lai Jiangshan
2013-04-02 2:24 ` Tejun Heo
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=20130401184402.GA31435@htj.dyndns.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®