[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR04MB37518A2859396BCE0EEF5270E7400@CY4PR04MB3751.namprd04.prod.outlook.com>
Date: Fri, 14 Aug 2020 12:20:34 +0000
From: Damien Le Moal <Damien.LeMoal@....com>
To: "hch@...radead.org" <hch@...radead.org>
CC: Kanchan Joshi <joshiiitr@...il.com>, Jens Axboe <axboe@...nel.dk>,
Pavel Begunkov <asml.silence@...il.com>,
Kanchan Joshi <joshi.k@...sung.com>,
"viro@...iv.linux.org.uk" <viro@...iv.linux.org.uk>,
"bcrl@...ck.org" <bcrl@...ck.org>,
Matthew Wilcox <willy@...radead.org>,
"linux-fsdevel@...r.kernel.org" <linux-fsdevel@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-aio@...ck.org" <linux-aio@...ck.org>,
"io-uring@...r.kernel.org" <io-uring@...r.kernel.org>,
"linux-block@...r.kernel.org" <linux-block@...r.kernel.org>,
"linux-api@...r.kernel.org" <linux-api@...r.kernel.org>,
SelvaKumar S <selvakuma.s1@...sung.com>,
Nitesh Shetty <nj.shetty@...sung.com>,
Javier Gonzalez <javier.gonz@...sung.com>,
Johannes Thumshirn <Johannes.Thumshirn@....com>,
Naohiro Aota <Naohiro.Aota@....com>
Subject: Re: [PATCH v4 6/6] io_uring: add support for zone-append
On 2020/08/14 21:04, hch@...radead.org wrote:
> On Fri, Aug 14, 2020 at 08:27:13AM +0000, Damien Le Moal wrote:
>>>
>>> O_APPEND pretty much implies out of order, as there is no way for an
>>> application to know which thread wins the race to write the next chunk.
>>
>> Yes and no. If the application threads do not synchronize their calls to
>> io_submit(), then yes indeed, things can get out of order. But if the
>> application threads are synchronized, then the offset set for each append AIO
>> will be in sequence of submission, so the user will not see its writes
>> completing at different write offsets than this implied offsets.
>
> Nothing gurantees any kind of ordering for two separate io_submit calls.
> The kernel may delay one of them for any reason.
Ah. Yes. The inode locking is at the single aio issuing level, not the io_submit
syscall level... So yes, in the end, the aios offsets and their execution order
can be anything. I see it now. So O_APPEND implying zone append is fine for zonefs.
>
> Now if you are doing two fully synchronous write calls on an
> O_APPEND fd, yes they are serialized. But using Zone Append won't
> change that.
Yep. That zonefs already does.
OK. So I think I will send a writeup of the semantic discussed so far. We also
still need a solution for io_uring interface for the written offset report and
we can implement.
--
Damien Le Moal
Western Digital Research
Powered by blists - more mailing lists