public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: Dan Schatzberg <schatzberg.dan@gmail.com>,
	Jens Axboe <axboe@kernel.dk>, Ming Lei <ming.lei@redhat.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Jan Kara <jack@suse.cz>, Christoph Hellwig <hch@lst.de>,
	linux-block <linux-block@vger.kernel.org>,
	linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH] loop: add WQ_MEM_RECLAIM flag to per device workqueue
Date: Mon, 21 Mar 2022 06:55:54 -1000	[thread overview]
Message-ID: <YjiuGnLVjj0Ouxtd@slm.duckdns.org> (raw)
In-Reply-To: <61f41e56-3650-f0fc-9ef5-7e19fe84e6b7@I-love.SAKURA.ne.jp>

Hello,

On Sat, Mar 19, 2022 at 11:02:51AM +0900, Tetsuo Handa wrote:
> Is the intent of __WQ_LEGACY flag to indicate that "this WQ was created
> using deprecated interface" ? But such intention no longer holds true.
> 
> Despite __WQ_LEGACY flag is described as "internal: create*_workqueue()",
> tegra194_cpufreq_probe()/scsi_add_host_with_dma()/iscsi_host_alloc()/
> iscsi_transport_init() are passing __WQ_LEGACY flag using alloc_workqueue()
> interface. Therefore, __WQ_LEGACY flag is no longer a meaningful indicator of
> "internal: create*_workqueue()". Description for __WQ_LEGACY flag needs an
> update.
...
> Given that the legacy create_workqueue() interface always implied WQ_MEM_RECLAIM flag,
>
> maybe it is better to make alloc_workqueue() interface WQ_MEM_RECLAIM by default.

That actually is pretty expensive when added up, which is why we went for
the shared worker pool model in the first place.

> That is, obsolete WQ_MEM_RECLAIM flag and __WQ_LEGACY flag, and introduce a new flag
> (e.g. WQ_MAY_SHARE_WORKER) which is passed to alloc_workqueue() interface only when
> it is absolutely confident that this WQ never participates in memory reclaim path and
> never participates in flush_workqueue()/flush_work() operation.

No, just fix the abusers. There are four abusers in the kernel and they
aren't difficult to fix.

Thanks.

-- 
tejun

  reply	other threads:[~2022-03-21 16:55 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-17 14:08 [PATCH] loop: add WQ_MEM_RECLAIM flag to per device workqueue Tetsuo Handa
2022-03-17 14:38 ` Dan Schatzberg
2022-03-18 12:05   ` Tetsuo Handa
2022-03-18 17:15     ` Tejun Heo
2022-03-19  2:02       ` Tetsuo Handa
2022-03-21 16:55         ` Tejun Heo [this message]
2022-03-21 22:53           ` Tetsuo Handa
2022-03-21 23:04             ` Tejun Heo
2022-03-21 23:17               ` Tetsuo Handa
2022-03-21 23:27                 ` Tejun Heo
2022-03-22  0:09                   ` Tetsuo Handa
2022-03-22 16:52                     ` Tejun Heo
2022-03-22 22:00                       ` Dave Chinner
2022-03-22 22:02                         ` Tejun Heo
2022-03-22 22:05                           ` Tetsuo Handa
2022-03-22 22:19                             ` Tejun Heo
2022-03-22 22:59                               ` Dave Chinner
2022-03-22 23:32                                 ` Tetsuo Handa
2022-03-22 23:50                                   ` Dave Chinner
2022-03-23  0:09                                 ` Tejun Heo

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=YjiuGnLVjj0Ouxtd@slm.duckdns.org \
    --to=tj@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=ming.lei@redhat.com \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=schatzberg.dan@gmail.com \
    /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