[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200624010253.GB5369@dread.disaster.area>
Date: Wed, 24 Jun 2020 11:02:53 +1000
From: Dave Chinner <david@...morbit.com>
To: Add@...r.kernel.org, support@...r.kernel.org, for@...r.kernel.org,
async@...r.kernel.org, buffered@...r.kernel.org,
reads@...r.kernel.org
Cc: io-uring@...r.kernel.org, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
akpm@...ux-foundation.org, Jens Axboe <axboe@...nel.dk>,
Johannes Weiner <hannes@...xchg.org>
Subject: Re: [PATCH 05/15] mm: allow read-ahead with IOCB_NOWAIT set
On Thu, Jun 18, 2020 at 08:43:45AM -0600, Jens Axboe wrote:
> The read-ahead shouldn't block, so allow it to be done even if
> IOCB_NOWAIT is set in the kiocb.
>
> Acked-by: Johannes Weiner <hannes@...xchg.org>
> Signed-off-by: Jens Axboe <axboe@...nel.dk>
> ---
> mm/filemap.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/mm/filemap.c b/mm/filemap.c
> index f0ae9a6308cb..3378d4fca883 100644
> --- a/mm/filemap.c
> +++ b/mm/filemap.c
> @@ -2028,8 +2028,6 @@ ssize_t generic_file_buffered_read(struct kiocb *iocb,
>
> page = find_get_page(mapping, index);
> if (!page) {
> - if (iocb->ki_flags & IOCB_NOWAIT)
> - goto would_block;
> page_cache_sync_readahead(mapping,
> ra, filp,
> index, last_index - index);
Doesn't think break preadv2(RWF_NOWAIT) semantics for on buffered
reads? i.e. this can now block on memory allocation for the page
cache, which is something RWF_NOWAIT IO should not do....
Cheers,
Dave.
--
Dave Chinner
david@...morbit.com
Powered by blists - more mailing lists