From: Tejun Heo <tj@kernel.org>
To: Jamie Liu <jamieliu@google.com>
Cc: Thomas Gleixner <tglx@linutronix.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: defer to waiting stop_machine
Date: Wed, 28 Aug 2013 17:13:12 -0400 [thread overview]
Message-ID: <20130828211312.GB18971@mtj.dyndns.org> (raw)
In-Reply-To: <1377724032-12199-1-git-send-email-jamieliu@google.com>
On Wed, Aug 28, 2013 at 02:07:12PM -0700, Jamie Liu wrote:
...
> @@ -734,7 +735,8 @@ static bool may_start_working(struct worker_pool *pool)
> static bool keep_working(struct worker_pool *pool)
> {
> return !list_empty(&pool->worklist) &&
> - atomic_read(&pool->nr_running) <= 1;
> + atomic_read(&pool->nr_running) <= 1 &&
> + likely(!stop_machine_pending());
Isn't the problem that the kworker wouldn't yield to the higher
priority stopper task while a work item keeps requeueing itself if
preemption is not enabled? If so, isn't the correct solution just
adding cond_resched() in the work item processing loop? The analysis
and solution seem to have gone a bit stray....
Thanks.
--
tejun
next prev parent reply other threads:[~2013-08-28 21:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 21:07 Jamie Liu
2013-08-28 21:13 ` Tejun Heo [this message]
2013-08-28 21:33 ` [PATCH] workqueue: cond_resched() after processing each work item Tejun Heo
2013-08-28 23:11 ` Jamie Liu
2013-08-29 20:45 ` [PATCH] workqueue: defer to waiting stop_machine Andreas Mohr
2013-08-29 20:52 ` Jamie Liu
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=20130828211312.GB18971@mtj.dyndns.org \
--to=tj@kernel.org \
--cc=jamieliu@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®