Netdev List
 help / color / mirror / Atom feed
From: Nicolai Buchwitz <nb@tipi-net.de>
To: Marco Crivellari <marco.crivellari@suse.com>
Cc: linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	Tejun Heo <tj@kernel.org>, Lai Jiangshan <jiangshanlai@gmail.com>,
	Frederic Weisbecker <frederic@kernel.org>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Michal Hocko <mhocko@suse.com>,
	Nicolas Ferre <nicolas.ferre@microchip.com>,
	Claudiu Beznea <claudiu.beznea@tuxon.dev>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Subject: Re: [RFC PATCH net-next] net: macb: Move delayed work on system_dfl_wq
Date: Sat, 16 May 2026 07:41:47 +0200	[thread overview]
Message-ID: <790e1a195d6bb5732bb061b4c5ac73a8@tipi-net.de> (raw)
In-Reply-To: <20260515152721.344380-1-marco.crivellari@suse.com>

On 15.5.2026 17:27, Marco Crivellari wrote:
> Currently the code enqueue work items using {queue|mod}_delayed_work(),
> using system_wq, which will be deprecated soon and replaced by
> system_percpu_wq.
> 
>    commit 128ea9f6ccfb ("workqueue: Add system_percpu_wq and 
> system_dfl_wq")
> 
> The function(s) mentioned earlier, 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.
> 
> 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_wq with system_dfl_wq so that the work may benefit from
> scheduler task placement.
> 
> Signed-off-by: Marco Crivellari <marco.crivellari@suse.com>
> ---
>  drivers/net/ethernet/cadence/macb_main.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/ethernet/cadence/macb_main.c 
> b/drivers/net/ethernet/cadence/macb_main.c
> index a12aa21244e8..42328b5ca403 100644
> --- a/drivers/net/ethernet/cadence/macb_main.c
> +++ b/drivers/net/ethernet/cadence/macb_main.c
> @@ -672,7 +672,7 @@ static void macb_tx_lpi_work_fn(struct work_struct 
> *work)
>  static void macb_tx_lpi_schedule(struct macb *bp)
>  {
>  	if (bp->eee_active)
> -		mod_delayed_work(system_wq, &bp->tx_lpi_work,
> +		mod_delayed_work(system_dfl_wq, &bp->tx_lpi_work,
>  				 usecs_to_jiffies(bp->tx_lpi_timer));
>  }
> 
> @@ -724,7 +724,7 @@ static int macb_mac_enable_tx_lpi(struct 
> phylink_config *config, u32 timer,
>  	/* Defer initial LPI entry by 1 second after link-up per
>  	 * IEEE 802.3az section 22.7a.
>  	 */
> -	mod_delayed_work(system_wq, &bp->tx_lpi_work, 
> msecs_to_jiffies(1000));
> +	mod_delayed_work(system_dfl_wq, &bp->tx_lpi_work, 
> msecs_to_jiffies(1000));
> 
>  	return 0;
>  }

Reviewed-by: Nicolai Buchwitz <nb@tipi-net.de>

Thanks
Nicolai

      reply	other threads:[~2026-05-16  5:41 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-15 15:27 [RFC PATCH net-next] net: macb: Move delayed work on system_dfl_wq Marco Crivellari
2026-05-16  5:41 ` Nicolai Buchwitz [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=790e1a195d6bb5732bb061b4c5ac73a8@tipi-net.de \
    --to=nb@tipi-net.de \
    --cc=andrew+netdev@lunn.ch \
    --cc=bigeasy@linutronix.de \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=frederic@kernel.org \
    --cc=jiangshanlai@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.crivellari@suse.com \
    --cc=mhocko@suse.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.ferre@microchip.com \
    --cc=pabeni@redhat.com \
    --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