From: Marco Crivellari <marco.crivellari@suse.com>
To: jthies@google.com
Cc: abhishekpandit@chromium.org, akuchynski@chromium.org,
bleung@chromium.org, dmitry.baryshkov@oss.qualcomm.com,
gregkh@linuxfoundation.org, heikki.krogerus@linux.intel.com,
linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Marco Crivellari <marco.crivellari@suse.com>
Subject: Re: [PATCH v1] usb: typec: ucsi: allow retries of ucsi_resume_work
Date: Fri, 28 Aug 2026 12:01:20 +0200 [thread overview]
Message-ID: <20260828100120.139648-1-marco.crivellari@suse.com> (raw)
In-Reply-To: <20260818205717.1492247-1-jthies@google.com>
Hi,
>+ if (++ucsi->resume_retries < 5) {
>+ queue_delayed_work(system_long_wq, &ucsi->resume_work,
>+ msecs_to_jiffies(500));
>+ return;
>+ }
Just one thing about this (same applies to the other queue_delayed_work() calls).
queue_delayed_work() calls:
queue_delayed_work_on(WORK_CPU_UNBOUND,...)
__queue_delayed_work(cpu, wq, dwork, delay)
__queue_delayed_work(cpu,...)
That perform this check:
if (likely(cpu == WORK_CPU_UNBOUND))
add_timer_global(timer);
else
...
It means the timer used is global / unbound: when it fires it will enqueue
the work on the CPU where the timer is executed. The workqueue you're
using is per-CPU.
I guess locality is not needed for correctness here, because of that, so
you can replace that workqueue with system_dfl_long_wq. This is the
unbound version.
system_long_wq is scheduled for removal.
Thanks,
--
Marco Crivellari
SUSE Labs
next prev parent reply other threads:[~2026-08-28 10:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-18 20:57 [PATCH v1] usb: typec: ucsi: allow retries of ucsi_resume_work Jameson Thies
2026-08-18 21:16 ` Benson Leung
2026-08-24 10:53 ` Heikki Krogerus
2026-08-28 10:01 ` Marco Crivellari [this message]
2026-09-04 0:13 ` Jameson Thies
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=20260828100120.139648-1-marco.crivellari@suse.com \
--to=marco.crivellari@suse.com \
--cc=abhishekpandit@chromium.org \
--cc=akuchynski@chromium.org \
--cc=bleung@chromium.org \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=gregkh@linuxfoundation.org \
--cc=heikki.krogerus@linux.intel.com \
--cc=jthies@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.