linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Damien Le Moal <Damien.LeMoal@wdc.com>
To: Randy Dunlap <rdunlap@infradead.org>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	"linux-xfs@vger.kernel.org" <linux-xfs@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Cc: Johannes Thumshirn <jth@kernel.org>,
	Naohiro Aota <Naohiro.Aota@wdc.com>,
	"Darrick J . Wong" <darrick.wong@oracle.com>,
	Hannes Reinecke <hare@suse.de>
Subject: Re: [PATCH v3 2/2] zonefs: Add documentation
Date: Wed, 25 Dec 2019 02:57:58 +0000	[thread overview]
Message-ID: <BN8PR04MB5812F5201C29A24CAB8C093DE7280@BN8PR04MB5812.namprd04.prod.outlook.com> (raw)
In-Reply-To: ac1bd604-0088-2002-f03b-5752425bb530@infradead.org

Randy,

On 2019/12/25 10:33, Randy Dunlap wrote:
[...]
>> +Sequential zone files can only be written sequentially, starting from the file
>> +end, that is, write operations can only be append writes. Zonefs makes no
>> +attempt at accepting random writes and will fail any write request that has a
>> +start offset not corresponding to the end of the last issued write.
>> +
>> +In order to give guarantees regarding write ordering, zonefs also prevents
>> +buffered writes and mmap writes for sequential files. Only direct IO writes are
>> +accepted. There are no restrictions on read operations nor on the type of IO
>> +used to request reads (buffered IOs, direct IOs and mmap reads are all
>> +accepted).
>> +
>> +Truncating sequential zone files is allowed only down to 0, in wich case, the
> 
>                                                                   which
> 
>> +zone is reset to rewind the file zone write pointer position to the start of
>> +the zone, or up to the zone size, in which case the file's zone is transitioned
>> +to the FULL state (finish zone operation).
> 
> Just to clarify, truncate can be done to zero or the the zone size, but nothing else.
> Is that correct?

Yes, that is correct. That matches the drive processing of the
REQ_OP_ZONE_RESET and REQ_OP_ZONE_FINISH requests which respectively
reset the zone (file size down to 0) and transition the zone to full
state (file size becomes zone size).

[...]
>> +# dd if=/dev/zero of=/mnt/seq/0 bs=4096 count=1 conv=notrunc oflag=direct
>> +1+0 records in
>> +1+0 records out
>> +4096 bytes (4.1 kB, 4.0 KiB) copied, 1.05112 s, 3.9 kB/s
> 
> why so slow?

Indeed, that is really slow. I missed it :)
The SMR drive I used for running this was probably in low power mode
when I ran dd and needed waking up first, hence the slow response time.
Running the same again, I get:

dd if=/dev/zero of=/mnt/seq/0 count=1 bs=4096 oflag=direct conv=notrunc
1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.000482601 s, 8.5 MB/s

0.5ms for a 4K direct write on an HDD, that looks OK to me (write cache
is enabled on the HDD side).

The same on a zoned null_blk device gives:

dd if=/dev/zero of=/mnt/seq/0 count=1 bs=4096 oflag=direct conv=notrunc
1+0 records in
1+0 records out
4096 bytes (4.1 kB, 4.0 KiB) copied, 0.00017558 s, 23.3 MB/s

175us for a single 4K direct write. Looks OK too.

Thank you for all the typo & nit pointers. I will fix everything and
post a v4.

-- 
Damien Le Moal
Western Digital Research

  reply	other threads:[~2019-12-25  2:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-24  2:06 [PATCH v3 0/2] New zonefs file system Damien Le Moal
2019-12-24  2:06 ` [PATCH v3 1/2] fs: " Damien Le Moal
2019-12-24  4:40   ` Darrick J. Wong
2019-12-25  6:05     ` Damien Le Moal
2019-12-25  7:20       ` Damien Le Moal
2019-12-25  8:21         ` Damien Le Moal
2020-01-02 21:36           ` Darrick J. Wong
2020-01-03  0:08             ` Linus Torvalds
2019-12-24  2:06 ` [PATCH v3 2/2] zonefs: Add documentation Damien Le Moal
2019-12-25  1:33   ` Randy Dunlap
2019-12-25  2:57     ` Damien Le Moal [this message]
2019-12-25  6:40     ` Damien Le Moal

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=BN8PR04MB5812F5201C29A24CAB8C093DE7280@BN8PR04MB5812.namprd04.prod.outlook.com \
    --to=damien.lemoal@wdc.com \
    --cc=Naohiro.Aota@wdc.com \
    --cc=darrick.wong@oracle.com \
    --cc=hare@suse.de \
    --cc=jth@kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=torvalds@linux-foundation.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).