public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Juri Lelli <juri.lelli@redhat.com>
To: Lai Jiangshan <jiangshanlai@gmail.com>
Cc: Tejun Heo <tj@kernel.org>, Aaron Tomlin <atomlin@atomlin.com>,
	Valentin Schneider <vschneid@redhat.com>,
	Waiman Long <longman@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH 4/4] kernel/workqueue: Let rescuers follow unbound wq cpumask changes
Date: Wed, 17 Jan 2024 07:30:16 +0100	[thread overview]
Message-ID: <Zadz-DT6lTdrx7US@localhost.localdomain> (raw)
In-Reply-To: <CAJhGHyBuf02mh=ezoua33UNu5QTpwP=qf-WP_C2qVyx_HEtMDg@mail.gmail.com>

Hello Lai,

On 17/01/24 11:56, Lai Jiangshan wrote:
> Hello, Juri
> 
> On Wed, Jan 17, 2024 at 12:20 AM Juri Lelli <juri.lelli@redhat.com> wrote:
> 
> > +       /* rescuer needs to respect wq cpumask changes */
> > +       if (ctx->wq->rescuer) {
> > +               set_cpus_allowed_ptr(ctx->wq->rescuer->task, ctx->attrs->cpumask);
> > +               wake_up_process(ctx->wq->rescuer->task);
> > +       }
> > +
> 
> What's the reason to wake up the rescuer?

I believe we want to wake it up so that it can possibly be moved
"instantly" to a cpu inside its new cpumask affinity. If we don't wake
it up it might be sleeping on a cpu outside its affinity which might
have become isolated and this cpu could be affected by that wakeup if
that only happens later on when possibly the rescuer needs to perform
some work.

Does is make more sense to you?

> I support this patch except for the wakeup:
> Reviewed-by: Lai Jiangshan <jiangshanlai@gmail.com>

Thanks for looking at this!

Juri


      reply	other threads:[~2024-01-17  6:30 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-16 16:19 [RFC PATCH 0/4] Fix handling of rescuers affinity Juri Lelli
2024-01-16 16:19 ` [RFC PATCH 1/4] tools/workqueue: Add rescuers printing to wq_dump.py Juri Lelli
2024-01-16 16:19 ` [RFC PATCH 2/4] kernel/workqueue: Bind rescuer to unbound cpumask for WQ_UNBOUND Juri Lelli
2024-01-16 18:47   ` Tejun Heo
2024-01-17  6:30     ` Juri Lelli
2024-01-16 16:19 ` [RFC PATCH 3/4] kernel/workqueue: Distinguish between general unbound and WQ_SYSFS cpumask changes Juri Lelli
2024-01-16 18:57   ` Tejun Heo
2024-01-17 13:06     ` Juri Lelli
2024-01-17 17:12       ` Tejun Heo
2024-01-17 19:32         ` Waiman Long
2024-01-17 19:42           ` Tejun Heo
2024-01-18 12:52             ` Juri Lelli
2024-01-16 16:19 ` [RFC PATCH 4/4] kernel/workqueue: Let rescuers follow unbound wq " Juri Lelli
2024-01-17  3:56   ` Lai Jiangshan
2024-01-17  6:30     ` Juri Lelli [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=Zadz-DT6lTdrx7US@localhost.localdomain \
    --to=juri.lelli@redhat.com \
    --cc=atomlin@atomlin.com \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=longman@redhat.com \
    --cc=tj@kernel.org \
    --cc=vschneid@redhat.com \
    /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