From: Tejun Heo <tj@kernel.org>
To: Ripduman Sohan <Ripduman.Sohan@cl.cam.ac.uk>
Cc: linux-kernel@vger.kernel.org, peterz@infradead.org
Subject: Re: [PATCH] workqueue: Restore cpus_allowed mask for sleeping workqueue rescue threads
Date: Sat, 17 Sep 2011 09:29:46 +0900 [thread overview]
Message-ID: <20110917002946.GU29319@htj.dyndns.org> (raw)
In-Reply-To: <20110915161430.GE1548@tusker>
Hello, Ripduman.
On Thu, Sep 15, 2011 at 05:14:30PM +0100, Ripduman Sohan wrote:
> The rescuer being left bound to the last CPU it was active on is not a
> problem. As I pointed out in the commit log the issue is that the
> allowed_cpus mask is not restored when rescuers return to sleep,
> rendering inconsistent the presented and actual set of CPUs the
> process may potentially run on.
>
> Perhaps an explanation is in order. I am working on a system where we
> constantly sample process run-state (including the process
> Cpus_Allowed field in /proc/<pid>/status) to build a forward plan of
> where the process _may_ run in the future. In situations of high
> memory pressue (common on our setup) where the rescuers ran often the
> plan begun to significantly deviate from the calculated schedule
> because rescuer threads were marked as only runnable on a single CPU
> when in reality they would bounce across CPUs.
But cpus_allowed doesn't mean where the task *may* run in the future.
It indicates on which cpus the task is allowed to run *now* and it's
allowed to change.
> I've currently put in a special-case exception in our code to account
> for the fact that rescuer threads may run on _any_ CPU regardless of
> the current cpus_allowed mask but I thought it would be useful to
> correct it. I'm happy to continue with my current approach if you
> deem the patch irrelevant.
I'm not necessarily against the patch if it helps a valid use case but
let's do that when and if the use case becomes relevant enough, which
I don't think it is yet. Please feel free to raise the issue again
when the situation changes.
Thank you.
--
tejun
next prev parent reply other threads:[~2011-09-17 0:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-09-01 13:36 Ripduman Sohan
2011-09-02 0:29 ` Tejun Heo
2011-09-15 16:14 ` Ripduman Sohan
2011-09-17 0:29 ` Tejun Heo [this message]
2011-09-18 6:36 ` Gilad Ben-Yossef
2011-09-24 3:07 ` Tejun Heo
2011-09-25 6:02 ` Gilad Ben-Yossef
2011-09-30 8:09 ` Tejun Heo
2011-09-30 8:54 ` Ripduman Sohan
2011-09-30 8:57 ` Tejun Heo
2011-09-30 8:59 ` Ripduman Sohan
2011-10-01 1:10 ` Tejun Heo
-- strict thread matches above, loose matches on Subject: below --
2011-08-31 13:17 Ripduman Sohan
2011-08-31 15:20 ` Peter Zijlstra
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=20110917002946.GU29319@htj.dyndns.org \
--to=tj@kernel.org \
--cc=Ripduman.Sohan@cl.cam.ac.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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®