Re: uvmpd_scan(): Recheck PG_BUSY after locking the page

2022-04-29 Thread Sebastien Marie
On Thu, Apr 28, 2022 at 12:28:45PM +0200, Martin Pieuchot wrote: > rw_enter(9) can sleep. When the lock is finally acquired by the > pagedaemon the previous check might no longer be true and the page > could be busy. In this case we shouldn't touch it. > > Diff below recheck for PG_BUSY after

uvmpd_scan(): Recheck PG_BUSY after locking the page

2022-04-28 Thread Martin Pieuchot
rw_enter(9) can sleep. When the lock is finally acquired by the pagedaemon the previous check might no longer be true and the page could be busy. In this case we shouldn't touch it. Diff below recheck for PG_BUSY after acquiring the lock and also use a variable for the lock to reduce the