From: imran.f.khan@oracle.com
To: Tejun Heo <tj@kernel.org>
Cc: jiangshanlai@gmail.com, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] workqueue: introduce queue_delayed_work_on_offline_safe.
Date: Tue, 14 Jan 2025 14:01:12 +1100 [thread overview]
Message-ID: <eab73ac2-d9eb-4ac7-9e0f-9a02b81a31bb@oracle.com> (raw)
In-Reply-To: <Z4VZsFBn13nBnGjb@slm.duckdns.org>
Hello Tejun,
Thanks for taking a look into it.
On 14/1/2025 5:21 am, Tejun Heo wrote:
> On Mon, Jan 13, 2025 at 03:35:40PM +1100, Imran Khan wrote:
> ...
>> I have kept the patch as RFC because from mailing list,
>> I could not find any users, of queue_delayed_work_on,
>> that is ending up queuing dwork on an offlined CPU.
>> We have some in-house code that is running into this problem,
>> and currently we are fixing it on caller side of queue_delayed_work_on.
>> Other users who run into this issue, can also use the approach of
>> fixing it on caller side or we can use the interface introduced
>> here for such use cases.
>
> I'm not sure how necessary this is. If the timer is okay to run on other
> CPUs, might as well just use queue_delayed_work().
>
Yes, right now I can't locate something in upstream kernel that gets
broken due to the issue mentioned here.
All (except 3, mentioned further down) users of queued_delayed_work_on
are using smp_processor_id(), to specify the CPU. So specified CPU can't
be an already offlined CPU.
I see below 3 files (in v6.12.6), using queue_delayed_work_on with some sort of cached
cpu information:
drivers/net/ethernet/pensando/ionic/ionic_dev.c -> line 177
drivers/scsi/esas2r/esas2r_main.c -> line 1858
drivers/scsi/lpfc/lpfc_sli.c
-> line 14987
-> line 15381
But looks like in these cases specified CPU remains online or
they simply have not encountered the issue mentioned here.
For this patch, yes the timer is okay to run on other CPUs but that is
only as a last resort, most of the times it could still run on specified
CPU (assuming its online)
Thanks,
Imran
> Thanks.
>
next prev parent reply other threads:[~2025-01-14 3:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 4:35 Imran Khan
2025-01-13 18:21 ` Tejun Heo
2025-01-14 3:01 ` imran.f.khan [this message]
2025-01-17 5:27 ` imran.f.khan
2025-01-31 10:37 ` imran.f.khan
2025-01-31 11:16 ` imran.f.khan
2025-02-03 11:48 ` Haakon Bugge
2025-02-04 5:54 ` imran.f.khan
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=eab73ac2-d9eb-4ac7-9e0f-9a02b81a31bb@oracle.com \
--to=imran.f.khan@oracle.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
all inboxes | Powered by JetHome®