On 02/11/21 17:38, David Woodhouse wrote:
This kind of makes a mockery of this repeated map/unmap dance which I thought was supposed to avoid pinning the page
The map/unmap dance is supposed to catch the moment where you'd look at a stale cache, by giving the non-atomic code a chance to update the gfn->pfn mapping.
The unmap is also the moment where you can mark the page as dirty. Paolo