From: Alexey Dobriyan <adobriyan@gmail.com>
To: krish.reddy@samsung.com
Cc: damien.lemoal@wdc.com, axboe@kernel.dk, fio@vger.kernel.org
Subject: Re: [PATCH 1/4] Add Zone Append command support for NVMe Zoned Namespaces (ZNS)
Date: Thu, 23 Jul 2020 17:32:45 +0300 [thread overview]
Message-ID: <20200723143245.GA1866332@localhost.localdomain> (raw)
> +.. option:: zone_append=bool
This forces 1 thread into either write or append.
I'm 99% sure this what everyone will benchmark, but still...
We're using different scheme, but it 100% rewrites I/O generation path. :-\
> +.BI zone_append
> +For \fBzonemode\fR =zbd and for \fBrw\fR=write or \fBrw\fR=randwrite, if
> +zone_append is enabled, the io_u points to the starting offset of a zone. On
> +successful completion the multiple of sectors relative to the zone's starting
> +offset is returned.
io_u->offset is a techicality, no user cares about. This should be rewritten in
user friendly language like "issue Zone Append command instead of Write".
I also think that io_u->offset should have normal value before ioengine
for debugging and detecting reordering.
> struct io_u {
> /*
> * for zone append this is the start offset of the zone.
> */
> unsigned long long zone_start_offset;
> + if (td->o.zone_append) {
> + pthread_mutex_lock(&z->mutex);
> + if (z->pending_ios > 0) {
> + z->pending_ios--;
> + /*
> + * Other threads may be waiting for pending I/O's to
> + * complete for this zone. Notify them.
> + */
> + if (!z->pending_ios)
> + pthread_cond_broadcast(&z->reset_cond);
> + }
> + }
You can do
if (--z->pending_ios == 0) {
pthread_cond_broadcast(&z->reset_cond);
}
This is probably wrong (see spurious wakeups):
> + * Wait for the pending requests to be completed
> + * else we are ok to reset this zone.
> + */
> + if (zb->pending_ios) {
> + pthread_cond_wait(&zb->reset_cond, &zb->mutex);
> + goto proceed;
> + }
next reply other threads:[~2020-07-23 14:32 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-23 14:32 Alexey Dobriyan [this message]
[not found] <CGME20200625174124epcas5p18e4fbc502c9cf1fef7e84ba5cefba945@epcas5p1.samsung.com>
2020-06-25 17:38 ` [PATCH 0/4] v2 Patchset : Zone Append command support for NVMe Zoned Namespaces (ZNS) Krishna Kanth Reddy
2020-06-25 17:38 ` [PATCH 1/4] Add " Krishna Kanth Reddy
2020-06-26 5:33 ` Damien Le Moal
2020-07-03 17:17 ` Krishna Kanth Reddy
2020-06-26 5:50 ` Damien Le Moal
2020-07-03 16:50 ` Krishna Kanth Reddy
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=20200723143245.GA1866332@localhost.localdomain \
--to=adobriyan@gmail.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@wdc.com \
--cc=fio@vger.kernel.org \
--cc=krish.reddy@samsung.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 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.