mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Waiman Long <longman@redhat.com>
To: Juri Lelli <juri.lelli@redhat.com>
Cc: Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
	linux-kernel@vger.kernel.org, Cestmir Kalina <ckalina@redhat.com>,
	Alex Gladkov <agladkov@redhat.com>
Subject: Re: [RFC PATCH 0/3] workqueue: Enable unbound cpumask update on ordered workqueues
Date: Wed, 31 Jan 2024 10:31:09 -0500	[thread overview]
Message-ID: <89927d84-279a-492e-83d3-6d3e20b722f7@redhat.com> (raw)
In-Reply-To: <ZbpElS5sQV_o9NG1@localhost.localdomain>


On 1/31/24 08:01, Juri Lelli wrote:
> Hi Waiman,
>
> Thanks for working on this!
>
> On 30/01/24 13:33, Waiman Long wrote:
>> Ordered workqueues does not currently follow changes made to the
>> global unbound cpumask because per-pool workqueue changes may break
>> the ordering guarantee. IOW, a work function in an ordered workqueue
>> may run on a cpuset isolated CPU.
>>
>> This series enables ordered workqueues to follow changes made to the
>> global unbound cpumask by temporaily saving the work items in an
>> internal queue until the old pwq has been properly flushed and to be
>> freed. At that point, those work items, if present, are queued back to
>> the new pwq to be executed.
> I took it for a quick first spin (on top of wq/for-6.9) and this is what
> I'm seeing.
>
> Let's take edac-poller ordered wq, as the behavior seems to be the same
> for the rest.
>
> Initially we have (using wq_dump.py)
>
> wq_unbound_cpumask=0xffffffff 000000ff
> ...
> pool[80] ref= 44 nice=  0 idle/workers=  2/  2 cpus=0xffffffff 000000ff pod_cpus=0xffffffff 000000ff
> ...
> edac-poller                      ordered    80 80 80 80 80 80 80 80 ...
> ...
> edac-poller                      0xffffffff 000000ff    345 0xffffffff 000000ff
>
> after I
>
> # echo 3 >/sys/devices/virtual/workqueue/cpumask
>
> I get
>
> wq_unbound_cpumask=00000003
> ...
> pool[86] ref= 44 nice=  0 idle/workers=  2/  2 cpus=00000003 pod_cpus=00000003
> ...
> edac-poller                      ordered    86 86 86 86 86 86 86 86 86 86 ...
> ...
> edac-poller                      0xffffffff 000000ff    345 0xffffffff 000000ff
>
> So, IIUC, the pool and wq -> pool settings are updated correctly, but
> the wq.unbound_cpus (and its associated rescure affinity) are left
> untouched. Is this expected or are we maybe still missing an additional
> step?

Isn't this what the 4th patch of your RFC workqueue patch series does?

https://lore.kernel.org/lkml/20240116161929.232885-5-juri.lelli@redhat.com/

The focus of this series is to make sure that we can update the pool 
cpumask of ordered workqueue to follow changes in global unbound 
workqueue cpumask. So I haven't touched anything related to rescuer at all.

I will include your 4th patch in the next version of this series.

Cheers,
Longman


  reply	other threads:[~2024-01-31 15:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30 18:33 Waiman Long
2024-01-30 18:33 ` [RFC PATCH 1/3] workqueue: Skip __WQ_DESTROYING workqueues when updating global unbound cpumask Waiman Long
2024-01-30 18:33 ` [RFC PATCH 2/3] workqueue: Break out __queue_work_rcu_locked() from __queue_work() Waiman Long
2024-01-30 18:33 ` [RFC PATCH 3/3] workqueue: Enable unbound cpumask update on ordered workqueues Waiman Long
2024-01-31 17:00   ` Tejun Heo
2024-01-31 17:02     ` Waiman Long
2024-01-31 13:01 ` [RFC PATCH 0/3] " Juri Lelli
2024-01-31 15:31   ` Waiman Long [this message]
2024-02-01 10:18     ` Juri Lelli
2024-02-01 14:28       ` Waiman Long
2024-02-02 14:55         ` Juri Lelli
2024-02-02 17:07           ` Tejun Heo
2024-02-02 19:03             ` Waiman Long
2024-02-05  6:30               ` Juri Lelli

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=89927d84-279a-492e-83d3-6d3e20b722f7@redhat.com \
    --to=longman@redhat.com \
    --cc=agladkov@redhat.com \
    --cc=ckalina@redhat.com \
    --cc=jiangshanlai@gmail.com \
    --cc=juri.lelli@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tj@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®