Re: [PATCH 0/2] Close a hole where IOCB_NOWAIT reads could sleep
From: Jens Axboe <axboe@kernel.dk>
Date: 2021-07-12 01:44:01
Also in:
io-uring, linux-fsdevel
From: Jens Axboe <axboe@kernel.dk>
Date: 2021-07-12 01:44:01
Also in:
io-uring, linux-fsdevel
On 7/11/21 9:09 AM, Matthew Wilcox (Oracle) wrote:
I noticed a theoretical case where an IOCB_NOWAIT read could sleep:
filemap_get_pages
filemap_get_read_batch
page_cache_sync_readahead
page_cache_sync_ra
ondemand_readahead
do_page_cache_ra
page_cache_ra_unbounded
gfp_t gfp_mask = readahead_gfp_mask(mapping);
memalloc_nofs_save()
__page_cache_alloc(gfp_mask);
We're in a nofs context, so we're not going to start new IO, but we might
wait for writeback to complete. We generally don't want to sleep for IO,
particularly not for IO that isn't related to us.
Jens, can you run this through your test rig and see if it makes any
practical difference?You bet, I'll see if I can trigger this condition and verify we're no longer blocking on writeback. Thanks for hacking this up. -- Jens Axboe