linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Tejun Heo <tj@kernel.org>
Cc: Christoph Hellwig <hch@lst.de>, Chris Mason <clm@meta.com>,
	Josef Bacik <josef@toxicpanda.com>, Chris Mason <clm@fb.com>,
	David Sterba <dsterba@suse.com>, Jens Axboe <axboe@kernel.dk>,
	cgroups@vger.kernel.org, linux-block@vger.kernel.org,
	linux-btrfs@vger.kernel.org
Subject: Re: move bio cgroup punting into btrfs
Date: Thu, 30 Mar 2023 02:15:52 +0200	[thread overview]
Message-ID: <20230330001552.GA2381@lst.de> (raw)
In-Reply-To: <ZCSOgoe84BhiUZcn@slm.duckdns.org>

On Wed, Mar 29, 2023 at 09:16:18AM -1000, Tejun Heo wrote:
> We didn't really look deep into adding the support but Chris mentioned that
> raid5/6 are likely to need something similar. Maybe this is because my grasp
> of filesytsems is pretty weak but the pattern doesn't seem unreasonable to
> me. There's some work to be done by a shread kthread and that sometimes can
> fork out IOs which belong to specific cgroups.

Well, in a cgroup aware writeback path we'd always be off much better
to just do the work from a cgroup specific thread instead of bouncing
it around.

> At least in the IO control and direct issue path, punting to just one thread
> hasn't been a practical problem given that when the issuing thread needs to
> be blocked, either the whole device or the cgroup needs to be throttled
> anyway.

I don't think it is a problem per see.  But it is: a) inefficient and
b) complex in terms of code.  So why bounce around between 2, or in case
of writeback 3 threads for a single I/O, instead of making sure your
offload threads are simplify cgroup specific to start with?

      reply	other threads:[~2023-03-30  0:16 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-27  0:49 move bio cgroup punting into btrfs Christoph Hellwig
2023-03-27  0:49 ` [PATCH 1/7] btrfs: move kthread_associate_blkcg out of btrfs_submit_compressed_write Christoph Hellwig
2023-03-27  0:49 ` [PATCH 2/7] btrfs: don't free the async_extent in submit_uncompressed_range Christoph Hellwig
2023-03-27  0:49 ` [PATCH 3/7] btrfs: also use kthread_associate_blkcg for uncompressible ranges Christoph Hellwig
2023-03-27  0:49 ` [PATCH 4/7] btrfs, mm: remove the punt_to_cgroup field in struct writeback_control Christoph Hellwig
2023-03-27  0:49 ` [PATCH 5/7] btrfs, block: move REQ_CGROUP_PUNT to btrfs Christoph Hellwig
2023-03-28  1:15   ` Jens Axboe
2023-03-27  0:49 ` [PATCH 6/7] block: async_bio_lock does not need to be bh-safe Christoph Hellwig
2023-03-27 23:31   ` Jens Axboe
2023-03-27  0:49 ` [PATCH 7/7] block: make blkcg_punt_bio_submit optional Christoph Hellwig
2023-03-27 23:32   ` Jens Axboe
2023-03-27 23:18 ` move bio cgroup punting into btrfs David Sterba
2023-03-31 17:25   ` David Sterba
2023-03-28 21:18 ` Chris Mason
2023-03-28 23:34   ` Christoph Hellwig
2023-03-29 19:16     ` Tejun Heo
2023-03-30  0:15       ` Christoph Hellwig [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=20230330001552.GA2381@lst.de \
    --to=hch@lst.de \
    --cc=axboe@kernel.dk \
    --cc=cgroups@vger.kernel.org \
    --cc=clm@fb.com \
    --cc=clm@meta.com \
    --cc=dsterba@suse.com \
    --cc=josef@toxicpanda.com \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-btrfs@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).