Re: [RFC] iomap: fix race between readahead and direct write

From: Jan Kara
Date: Mon Jan 20 2020 - 06:42:16 EST


On Sun 19-01-20 09:17:00, yukuai (C) wrote:
>
>
> On 2020/1/17 19:05, Jan Kara wrote:
> > provide
> > allocation for each page separately
>
> Thank you for your response!
>
> I do understand there will be additional CPU overhead. But page is allocated
> in __do_page_cache_readahead(), which is called before
> iomap_begin(). And I did not change that.

Sorry, I didn't express myself clearly. In "...one of the big points of iomap
infrastructure is that you call filesystem once to give you large extent
instead of calling it to provide allocation for each page separately." I
meant that with your patch, you call into filesystem to provide "block
allocation information" for each page separately. And it seems we both
agree this is going to cause additional CPU usage in the common case to
improve mostly unsupported corner case.

Honza
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR