Download raw body.
Sync uao_get() with uvn_get()
On Tue, Nov 26, 2024 at 12:11:34PM +0100, Martin Pieuchot wrote: > uao_get() and uvn_get() are the two `pgo_get' implementations used by > the lower layer fault handler. First they are called with PGO_LOCKED > to return resident pages, then if needed, they are called again with > PGO_SYNCIO to fetch content of the page from disk (or cache). > > The comment for uao_get() explains the following: > > /* > * uao_get: fetch me a page > * > * we have three cases: > * 1: page is resident -> just return the page. > * 2: page is zero-fill -> allocate a new page and zero it. > * 3: page is swapped out -> fetch the page from swap. > * > * cases 1 can be handled with PGO_LOCKED, cases 2 and 3 cannot. > [...] > */ > > However case 2 is currently optimistically handled with PGO_LOCKED, if > the NOWAIT allocation succeeds. > > Diff below changes that and sync the PGO_LOCKED case with uvn_get() in > preparation for faulting ahead resident pages in parallel. > > The explanation for this change is that PGO_LOCKED will be soon a read- > only operation, so we do not want any modification on the underlying UVM > object. > > While here reduce some cosmetic differences in sync with NetBSD. ok tb
Sync uao_get() with uvn_get()