From: Sven Schnelle <svens@linux.ibm.com>
To: Tejun Heo <tj@kernel.org>
Cc: Lai Jiangshan <jiangshanlai@gmail.com>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] workqueue: fix selection of wake_cpu in kick_pool()
Date: Tue, 23 Apr 2024 08:20:37 +0200 [thread overview]
Message-ID: <yt9dr0ew8uru.fsf@linux.ibm.com> (raw)
In-Reply-To: <ZiboW5wm5M8Ee6ip@slm.duckdns.org> (Tejun Heo's message of "Mon, 22 Apr 2024 12:44:43 -1000")
Tejun Heo <tj@kernel.org> writes:
> Hello,
>
> On Mon, Apr 15, 2024 at 07:35:49AM +0200, Sven Schnelle wrote:
>> diff --git a/kernel/workqueue.c b/kernel/workqueue.c
>> index 0066c8f6c154..d02b0c02c9e2 100644
>> --- a/kernel/workqueue.c
>> +++ b/kernel/workqueue.c
>> @@ -1277,7 +1277,8 @@ static bool kick_pool(struct worker_pool *pool)
>> !cpumask_test_cpu(p->wake_cpu, pool->attrs->__pod_cpumask)) {
>> struct work_struct *work = list_first_entry(&pool->worklist,
>> struct work_struct, entry);
>> - p->wake_cpu = cpumask_any_distribute(pool->attrs->__pod_cpumask);
>> + p->wake_cpu = cpumask_any_and_distribute(pool->attrs->__pod_cpumask,
>> + cpu_online_mask);
>
> So, this wouldn't necessarily fix the problem completely but regardless of
> how that's plugged, this is still something we want to do to avoid picking
> offline CPUs. Can you please update the patch description accordingly and
> resend?
I'll just sent v2. I didn't mention the arch_vcpu_is_preempted() issue
in the commit description, as i'm not yet sure whether that's a wrong
assumption the s390 code or in the common code. Still waiting whether
Peter has some insight.
prev parent reply other threads:[~2024-04-23 6:20 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-15 5:35 [PATCH] workqueue: fix selection of wake_cpu in kick_pool() Sven Schnelle
2024-04-16 23:06 ` Tejun Heo
2024-04-17 15:36 ` Sven Schnelle
2024-04-18 1:55 ` Tejun Heo
2024-04-18 5:54 ` Sven Schnelle
2024-04-18 15:56 ` Tejun Heo
2024-04-19 8:27 ` Sven Schnelle
2024-04-19 15:40 ` Tejun Heo
2024-04-22 22:44 ` Tejun Heo
2024-04-23 6:20 ` Sven Schnelle [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=yt9dr0ew8uru.fsf@linux.ibm.com \
--to=svens@linux.ibm.com \
--cc=jiangshanlai@gmail.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