Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-05 Thread Bart Van Assche
On 2/5/24 15:48, Damien Le Moal wrote: On 2/6/24 02:48, Bart Van Assche wrote: On 2/1/24 23:30, Damien Le Moal wrote: +#define blk_zone_wplug_lock(zwplug, flags) \ + spin_lock_irqsave(>lock, flags) + +#define blk_zone_wplug_unlock(zwplug, flags) \ + spin_unlock_irqrestore(>lock,

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-05 Thread Damien Le Moal
On 2/6/24 02:48, Bart Van Assche wrote: > On 2/1/24 23:30, Damien Le Moal wrote: >> The next plugged BIO is unplugged and issued once the write request >> completes. > > So this patch series is orthogonal to my patch series that implements zoned > write pipelining? I don't know. >>

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-05 Thread Bart Van Assche
On 2/1/24 23:30, Damien Le Moal wrote: The next plugged BIO is unplugged and issued once the write request completes. So this patch series is orthogonal to my patch series that implements zoned write pipelining? This mechanism allows to: - Untangles zone write ordering from block IO

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-05 Thread Damien Le Moal
On 2/5/24 21:20, Damien Le Moal wrote: > On 2/5/24 19:06, Ming Lei wrote: >> On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote: >>> On 2/5/24 11:19, Ming Lei wrote: >>> +static inline void blk_zone_wplug_add_bio(struct blk_zone_wplug >>> *zwplug, >>> +

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-05 Thread Damien Le Moal
On 2/5/24 19:06, Ming Lei wrote: > On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote: >> On 2/5/24 11:19, Ming Lei wrote: >> +static inline void blk_zone_wplug_add_bio(struct blk_zone_wplug *zwplug, >> + struct bio *bio, unsigned int

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-05 Thread Ming Lei
On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote: > On 2/5/24 11:19, Ming Lei wrote: > +static inline void blk_zone_wplug_add_bio(struct blk_zone_wplug *zwplug, > + struct bio *bio, unsigned int > nr_segs) > +{ > +

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Damien Le Moal
On 2/5/24 14:50, Christoph Hellwig wrote: > On Mon, Feb 05, 2024 at 02:37:41PM +0900, Damien Le Moal wrote: >> OK. So I think that Hannes'idea to get/put the queue usage counter reference >> based on a zone BIO plug becoming not empty (get ref) and becoming empty (put >> ref) may be simpler then.

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Christoph Hellwig
On Mon, Feb 05, 2024 at 02:37:41PM +0900, Damien Le Moal wrote: > OK. So I think that Hannes'idea to get/put the queue usage counter reference > based on a zone BIO plug becoming not empty (get ref) and becoming empty (put > ref) may be simpler then. And that would also work in the same way for

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Damien Le Moal
On 2/5/24 14:11, Christoph Hellwig wrote: > On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote: >>> I think only queue re-configuration(blk_revalidate_zone) requires the >>> queue usage counter. Otherwise, bdev open()/close() should work just >>> fine. >> >> I want to check FS case

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Christoph Hellwig
On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote: > > I think only queue re-configuration(blk_revalidate_zone) requires the > > queue usage counter. Otherwise, bdev open()/close() should work just > > fine. > > I want to check FS case though. No clear if mounting FS that supports

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Ming Lei
On Mon, Feb 05, 2024 at 11:41:04AM +0900, Damien Le Moal wrote: > On 2/5/24 11:19, Ming Lei wrote: > +static inline void blk_zone_wplug_add_bio(struct blk_zone_wplug *zwplug, > + struct bio *bio, unsigned int > nr_segs) > +{ > +

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Damien Le Moal
On 2/5/24 11:19, Ming Lei wrote: +static inline void blk_zone_wplug_add_bio(struct blk_zone_wplug *zwplug, +struct bio *bio, unsigned int nr_segs) +{ + /* + * Keep a reference on the BIO request queue usage. This reference will +

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Ming Lei
On Mon, Feb 05, 2024 at 08:57:00AM +0900, Damien Le Moal wrote: > On 2/4/24 12:56, Ming Lei wrote: > > On Fri, Feb 02, 2024 at 04:30:44PM +0900, Damien Le Moal wrote: > >> +/* > >> + * Zone write plug flags bits: > >> + * - BLK_ZONE_WPLUG_CONV: Indicate that the zone is a conventional one. > >>

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Damien Le Moal
On 2/4/24 12:56, Ming Lei wrote: > On Fri, Feb 02, 2024 at 04:30:44PM +0900, Damien Le Moal wrote: >> +/* >> + * Zone write plug flags bits: >> + * - BLK_ZONE_WPLUG_CONV: Indicate that the zone is a conventional one. >> Writes >> + *to these zones are never plugged. >> + * -

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-04 Thread Hannes Reinecke
On 2/2/24 15:30, Damien Le Moal wrote: Zone write plugging implements a per-zone "plug" for write operations to tightly control the submission and execution order of writes to sequential write required zones of a zoned block device. Per-zone plugging of writes guarantees that at any time at most

Re: [PATCH 06/26] block: Introduce zone write plugging

2024-02-03 Thread Ming Lei
On Fri, Feb 02, 2024 at 04:30:44PM +0900, Damien Le Moal wrote: > Zone write plugging implements a per-zone "plug" for write operations to > tightly control the submission and execution order of writes to > sequential write required zones of a zoned block device. Per-zone > plugging of writes

[PATCH 06/26] block: Introduce zone write plugging

2024-02-01 Thread Damien Le Moal
Zone write plugging implements a per-zone "plug" for write operations to tightly control the submission and execution order of writes to sequential write required zones of a zoned block device. Per-zone plugging of writes guarantees that at any time at most one write request per zone is in flight.