Re: RFA (Request for Advice): block/bio: get_user_pages() --> pin_user_pages()
From: John Hubbard <jhubbard@nvidia.com>
Date: 2022-01-25 03:44:34
Also in:
linux-fsdevel
From: John Hubbard <jhubbard@nvidia.com>
Date: 2022-01-25 03:44:34
Also in:
linux-fsdevel
On 1/24/22 02:05, Jan Kara wrote: ...
quoted
do_direct_IO() dio_zero_block() page = ZERO_PAGE(0); <-- This is a problem I'm not sure what to use, instead of that zero page! The zero page doesn't need to be allocated nor tracked, and so any replacement approaches would need either other storage, or some horrid scheme that I won't go so far as to write on the screen. :)Well, I'm not sure if you consider this ugly but currently we use get_page() in that path exactly so that bio_release_pages() does not have to care about zero page. So now we could grab pin on the zero page instead through try_grab_page() or something like that... Honza
So it sounds like you prefer this over checking for the zero page in bio_release_pages(). I'll take a look at both ideas, then, and see what it looks like. thanks, -- John Hubbard NVIDIA