drivers/platform/x86/asus-tf103c-dock.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Currently the code enqueue work items using {queue|mod}_delayed_work(),
using system_long_wq. This workqueue should be used when long works are
expected and it is a per-cpu workqueue.
The function(s) end up calling __queue_delayed_work(), which set a global
timer that could fire anywhere, enqueuing the work where the timer fired.
Unbound works could benefit from scheduler task placement, to optimize
performance and power consumption. Long work shouldn't stick to a single
CPU.
Recently, a new unbound workqueue specific for long running work has
been added:
c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
Since the workqueue work doesn't rely on per-cpu variables, there is no
obvious reason that justify the use of a per-cpu workqueue. So change
system_long_wq with system_dfl_long_wq so that the work may benefit from
scheduler task placement.
Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
---
drivers/platform/x86/asus-tf103c-dock.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c
index f09a3fc6524a..de683e17ce01 100644
--- a/drivers/platform/x86/asus-tf103c-dock.c
+++ b/drivers/platform/x86/asus-tf103c-dock.c
@@ -669,7 +669,8 @@ static irqreturn_t tf103c_dock_hpd_irq(int irq, void *data)
{
struct tf103c_dock_data *dock = data;
- mod_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE);
+ mod_delayed_work(system_dfl_long_wq, &dock->hpd_work,
+ TF103C_DOCK_HPD_DEBOUNCE);
return IRQ_HANDLED;
}
@@ -677,7 +678,8 @@ static void tf103c_dock_start_hpd(struct tf103c_dock_data *dock)
{
enable_irq(dock->hpd_irq);
/* Sync current HPD status */
- queue_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE);
+ queue_delayed_work(system_dfl_long_wq, &dock->hpd_work,
+ TF103C_DOCK_HPD_DEBOUNCE);
}
static void tf103c_dock_stop_hpd(struct tf103c_dock_data *dock)
--
2.53.0
Hi,
On 7-May-26 16:39, Marco Crivellari wrote:
> Currently the code enqueue work items using {queue|mod}_delayed_work(),
> using system_long_wq. This workqueue should be used when long works are
> expected and it is a per-cpu workqueue.
>
> The function(s) end up calling __queue_delayed_work(), which set a global
> timer that could fire anywhere, enqueuing the work where the timer fired.
>
> Unbound works could benefit from scheduler task placement, to optimize
> performance and power consumption. Long work shouldn't stick to a single
> CPU.
>
> Recently, a new unbound workqueue specific for long running work has
> been added:
>
> c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
>
> Since the workqueue work doesn't rely on per-cpu variables, there is no
> obvious reason that justify the use of a per-cpu workqueue. So change
> system_long_wq with system_dfl_long_wq so that the work may benefit from
> scheduler task placement.
>
> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
Thanks, patch looks good to me:
Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
Regards,
Hans
> ---
> drivers/platform/x86/asus-tf103c-dock.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c
> index f09a3fc6524a..de683e17ce01 100644
> --- a/drivers/platform/x86/asus-tf103c-dock.c
> +++ b/drivers/platform/x86/asus-tf103c-dock.c
> @@ -669,7 +669,8 @@ static irqreturn_t tf103c_dock_hpd_irq(int irq, void *data)
> {
> struct tf103c_dock_data *dock = data;
>
> - mod_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE);
> + mod_delayed_work(system_dfl_long_wq, &dock->hpd_work,
> + TF103C_DOCK_HPD_DEBOUNCE);
> return IRQ_HANDLED;
> }
>
> @@ -677,7 +678,8 @@ static void tf103c_dock_start_hpd(struct tf103c_dock_data *dock)
> {
> enable_irq(dock->hpd_irq);
> /* Sync current HPD status */
> - queue_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE);
> + queue_delayed_work(system_dfl_long_wq, &dock->hpd_work,
> + TF103C_DOCK_HPD_DEBOUNCE);
> }
>
> static void tf103c_dock_stop_hpd(struct tf103c_dock_data *dock)
On Thu, 7 May 2026, Hans de Goede wrote:
> Hi,
>
> On 7-May-26 16:39, Marco Crivellari wrote:
> > Currently the code enqueue work items using {queue|mod}_delayed_work(),
> > using system_long_wq. This workqueue should be used when long works are
> > expected and it is a per-cpu workqueue.
> >
> > The function(s) end up calling __queue_delayed_work(), which set a global
> > timer that could fire anywhere, enqueuing the work where the timer fired.
> >
> > Unbound works could benefit from scheduler task placement, to optimize
> > performance and power consumption. Long work shouldn't stick to a single
> > CPU.
> >
> > Recently, a new unbound workqueue specific for long running work has
> > been added:
> >
> > c116737e972e ("workqueue: Add system_dfl_long_wq for long unbound works")
> >
> > Since the workqueue work doesn't rely on per-cpu variables, there is no
> > obvious reason that justify the use of a per-cpu workqueue. So change
> > system_long_wq with system_dfl_long_wq so that the work may benefit from
> > scheduler task placement.
> >
> > Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
>
> Thanks, patch looks good to me:
>
> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
>
> Regards,
>
> Hans
>
>
>
> > ---
> > drivers/platform/x86/asus-tf103c-dock.c | 6 ++++--
> > 1 file changed, 4 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/platform/x86/asus-tf103c-dock.c b/drivers/platform/x86/asus-tf103c-dock.c
> > index f09a3fc6524a..de683e17ce01 100644
> > --- a/drivers/platform/x86/asus-tf103c-dock.c
> > +++ b/drivers/platform/x86/asus-tf103c-dock.c
> > @@ -669,7 +669,8 @@ static irqreturn_t tf103c_dock_hpd_irq(int irq, void *data)
> > {
> > struct tf103c_dock_data *dock = data;
> >
> > - mod_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE);
> > + mod_delayed_work(system_dfl_long_wq, &dock->hpd_work,
> > + TF103C_DOCK_HPD_DEBOUNCE);
> > return IRQ_HANDLED;
> > }
> >
> > @@ -677,7 +678,8 @@ static void tf103c_dock_start_hpd(struct tf103c_dock_data *dock)
> > {
> > enable_irq(dock->hpd_irq);
> > /* Sync current HPD status */
> > - queue_delayed_work(system_long_wq, &dock->hpd_work, TF103C_DOCK_HPD_DEBOUNCE);
> > + queue_delayed_work(system_dfl_long_wq, &dock->hpd_work,
> > + TF103C_DOCK_HPD_DEBOUNCE);
> > }
> >
> > static void tf103c_dock_stop_hpd(struct tf103c_dock_data *dock)
>
Hi Marco,
Is there some particular reason why this was sent as RFC?
--
i.
On Fri, May 8, 2026 at 3:34 PM Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> wrote: > Hi Marco, > > Is there some particular reason why this was sent as RFC? > Hi Ilpo, The only reason was to ensure my check regarding per-cpu variables was sufficient and that there was no specific reason to keep them per-CPU, and to comment on it if necessary. Thanks! -- Marco Crivellari SUSE Labs
© 2016 - 2026 Red Hat, Inc.