All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederic Weisbecker <frederic@kernel.org>
To: Michal Hocko <mhocko@suse.com>
Cc: Marco Crivellari <marco.crivellari@suse.com>,
	linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>,
	Lai Jiangshan <jiangshanlai@gmail.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Subject: Re: [PATCH 4/4] Workqueue: add WQ_PERCPU to every alloc_workqueue user
Date: Tue, 6 May 2025 14:36:21 +0200	[thread overview]
Message-ID: <aBoCRTWyYkOCN6TE@localhost.localdomain> (raw)
In-Reply-To: <aBiDSHee4TKs8HF-@tiehlicka>

Le Mon, May 05, 2025 at 11:22:16AM +0200, Michal Hocko a écrit :
> On Sat 03-05-25 10:28:34, Marco Crivellari wrote:
> > By default, alloc_workqueue() creates bound workqueues
> > (i.e., without WQ_UNBOUND).
> > 
> > With the introduction of the WQ_PERCPU flag (equivalent
> > to !WQ_UNBOUND), any alloc_workqueue() caller that
> > doesn’t explicitly specify WQ_UNBOUND must now use WQ_PERCPU.
> > 
> > All existing users have been updated accordingly.
> 
> I assume that the next step is to drop WQ_PERCPU when it is not strictly
> necessary, right?

Indeed. And also convert the users of schedule_work() and queue_work(system_wq, ...)

> 
> Looking at the huge list this will be a huge undergoing. Is there any
> rule of thumb to tell whether WQ_PERCPU is required or not? Maybe
> something as simple as - if the worker doesn't use any per cpu variables
> then it is highly likely that it doesn't need WQ_PERCPU? Are there other
> useful hints?

None that I know of. But yes it is a very big work. Ideally we
should focus on core users first. And then we can think about
the drivers later...

-- 
Frederic Weisbecker
SUSE Labs

  reply	other threads:[~2025-05-06 12:36 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-03  8:28 [PATCH 0/4] Workqueue: rename system workqueue and add WQ_PERCPU Marco Crivellari
2025-05-03  8:28 ` [PATCH 1/4] Workqueue: rename system_wq to system_percpu_wq Marco Crivellari
2025-05-03  8:28 ` [PATCH 2/4] Workqueue: rename system_unbound_wq to system_dfl_wq Marco Crivellari
2025-05-03  8:28 ` [PATCH 3/4] Workqueue: add WQ_PERCPU Marco Crivellari
2025-05-03  8:28 ` [PATCH 4/4] Workqueue: add WQ_PERCPU to every alloc_workqueue user Marco Crivellari
2025-05-05  6:56   ` Sebastian Andrzej Siewior
2025-05-05  9:22   ` Michal Hocko
2025-05-06 12:36     ` Frederic Weisbecker [this message]
2025-05-05  6:51 ` [PATCH 0/4] Workqueue: rename system workqueue and add WQ_PERCPU Sebastian Andrzej Siewior
2025-05-05  7:55   ` Marco Crivellari
2025-05-05  9:25   ` Michal Hocko
2025-05-06  7:53     ` Marco Crivellari
2025-05-05 23:39 ` Tejun Heo
2025-05-06 10:10   ` Marco Crivellari
2025-05-06 12:55     ` Frederic Weisbecker
2025-05-07  0:42       ` Tejun Heo
2025-05-07 12:04         ` Frederic Weisbecker

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=aBoCRTWyYkOCN6TE@localhost.localdomain \
    --to=frederic@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=jiangshanlai@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marco.crivellari@suse.com \
    --cc=mhocko@suse.com \
    --cc=tglx@linutronix.de \
    --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 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.