linux-block.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jaegeuk Kim <jaegeuk@kernel.org>
To: Damien Le Moal <dlemoal@kernel.org>
Cc: Bart Van Assche <bvanassche@acm.org>,
	Niklas Cassel <nks@flawful.org>, Jens Axboe <axboe@kernel.dk>,
	linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
	Ming Lei <ming.lei@redhat.com>, Matias Bjorling <mb@lightnvm.io>
Subject: Re: [PATCH v2 10/11] block: Add support for the zone capacity concept
Date: Thu, 20 Apr 2023 17:29:12 -0700	[thread overview]
Message-ID: <ZEHY2PIRCCLOZsC4@google.com> (raw)
In-Reply-To: <c4a52bff-5cab-5029-ad7f-e5f9452bc0e2@kernel.org>

On 04/21, Damien Le Moal wrote:
> On 4/21/23 08:44, Bart Van Assche wrote:
> > On 4/20/23 16:37, Damien Le Moal wrote:
> >> Why would you need to handle the max active zone number restriction in the
> >> scheduler ? That is the user responsibility. btrfs does it (that is still buggy
> >> though, working on it).
> > 
> > Hi Damien,
> > 
> > If the user (filesystem) restricts the number of active zones, the code 
> > for restricting the number of active zones will have to be duplicated 
> > into every filesystem that supports zoned devices. Wouldn't it be better 
> > if the I/O scheduler tracks the number of active zones?
> 
> I do not think so. The reason is that for a file system, the block allocator
> must be aware of any active zone limit of the underlying device to make the best
> decision possible regarding where to allocate blocks for files and metadata. For

Well, I'm wondering what kind of decision FS can make when allocating zones?

> btrfs, we added "active block groups" management for that purpose. And we have
> tracking of a block group active state so that the block allocator can start
> using new block groups (inactive ones) when previously used ones become full. We
> also have a "finish block group" for cases when there is not enough remaining
> free blocks in a group/zone (this does a finish zone operation to make a
> non-full zone full, that is, inactive).
> 
> Even if the block IO scheduler were to track active zones, the FS would still
> need to do its own tracking (e.g. to be able to finish zones when needed). So I

Why does FS also need to track the # of open zones redundantly? I have two
concerns if FS needs to force it:
1) performance - waiting for finish_zone before allocating a new zone can break
the IO pipeline and block FS operations.
2) multiple partition support - if F2FS uses two partitions, one on conventional
partition while the other on zoned partition, we have to maintain such tracking
mechanism on zoned partition only which gives some code complexity.

In general, doesn't it make sense that FS (not zoned-device FS) just needs to
guarantee sequential writes per zone, while IO scheduler needs to limit the #
of open zones gracefully?

> do not see the point in having the block scheduler doing anything about active
> zones.
> 

  reply	other threads:[~2023-04-21  0:29 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 22:39 [PATCH v2 00/11] mq-deadline: Improve support for zoned block devices Bart Van Assche
2023-04-18 22:39 ` [PATCH v2 01/11] block: Simplify blk_req_needs_zone_write_lock() Bart Van Assche
2023-04-19  4:09   ` Christoph Hellwig
2023-04-18 22:39 ` [PATCH v2 02/11] block: Micro-optimize blk_req_needs_zone_write_lock() Bart Van Assche
2023-04-19  4:11   ` Christoph Hellwig
2023-04-19 18:30     ` Bart Van Assche
2023-04-20  5:00       ` Christoph Hellwig
2023-04-18 22:39 ` [PATCH v2 03/11] block: Introduce blk_rq_is_seq_zoned_write() Bart Van Assche
2023-04-19  4:50   ` Christoph Hellwig
2023-04-19 21:12     ` Bart Van Assche
2023-04-20  1:03       ` Damien Le Moal
2023-04-20  5:01         ` Christoph Hellwig
2023-04-18 22:39 ` [PATCH v2 04/11] block: mq-deadline: Simplify deadline_skip_seq_writes() Bart Van Assche
2023-04-19  4:52   ` Christoph Hellwig
2023-04-18 22:39 ` [PATCH v2 05/11] block: mq-deadline: Improve deadline_skip_seq_writes() Bart Van Assche
2023-04-18 22:39 ` [PATCH v2 06/11] block: mq-deadline: Disable head insertion for zoned writes Bart Van Assche
2023-04-19  4:30   ` Christoph Hellwig
2023-04-19 22:43     ` Bart Van Assche
2023-04-20  5:06       ` Christoph Hellwig
2023-04-20 17:00         ` Bart Van Assche
2023-04-24  7:00           ` Christoph Hellwig
2023-04-18 22:39 ` [PATCH v2 07/11] block: mq-deadline: Preserve write streams for all device types Bart Van Assche
2023-04-18 22:39 ` [PATCH v2 08/11] block: mq-deadline: Fix a race condition related to zoned writes Bart Van Assche
2023-04-19  5:07   ` Christoph Hellwig
2023-04-19 18:46     ` Bart Van Assche
2023-04-20  1:00       ` Damien Le Moal
2023-04-18 22:40 ` [PATCH v2 09/11] block: mq-deadline: Handle requeued requests correctly Bart Van Assche
2023-04-19  5:07   ` Christoph Hellwig
2023-04-19 23:01     ` Bart Van Assche
2023-04-20  1:07       ` Damien Le Moal
2023-04-18 22:40 ` [PATCH v2 10/11] block: Add support for the zone capacity concept Bart Van Assche
2023-04-20  9:23   ` Niklas Cassel
2023-04-20 17:12     ` Bart Van Assche
2023-04-20 22:00       ` Damien Le Moal
2023-04-20 22:51         ` Bart Van Assche
2023-04-20 23:37           ` Damien Le Moal
2023-04-20 23:44             ` Bart Van Assche
2023-04-20 23:53               ` Damien Le Moal
2023-04-21  0:29                 ` Jaegeuk Kim [this message]
2023-04-21  1:52                   ` Damien Le Moal
2023-04-21 20:15                     ` Jaegeuk Kim
2023-04-21 22:25                       ` Damien Le Moal
2023-04-24  6:01                         ` Christoph Hellwig
2023-04-24 17:58                           ` Jaegeuk Kim
2023-04-24 19:05                           ` Jaegeuk Kim
2023-04-25 13:38                           ` Damien Le Moal
2023-04-24 17:48                         ` Jaegeuk Kim
2023-04-18 22:40 ` [PATCH v2 11/11] block: mq-deadline: Respect the active zone limit Bart Van Assche

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=ZEHY2PIRCCLOZsC4@google.com \
    --to=jaegeuk@kernel.org \
    --cc=axboe@kernel.dk \
    --cc=bvanassche@acm.org \
    --cc=dlemoal@kernel.org \
    --cc=hch@lst.de \
    --cc=linux-block@vger.kernel.org \
    --cc=mb@lightnvm.io \
    --cc=ming.lei@redhat.com \
    --cc=nks@flawful.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).