Re: [PATCH 1/2] x86/shadow: defer/avoid paging_mfn_is_dirty() invocation

2021-12-02 Thread Tim Deegan
At 11:35 +0100 on 01 Dec (1638358515), Jan Beulich wrote: > paging_mfn_is_dirty() is moderately expensive, so avoid its use unless > its result might actually change anything. This means moving the > surrounding if() down below all other checks that can result in clearing > _PAGE_RW from sflags,

Re: [PATCH 1/2] x86/shadow: defer/avoid paging_mfn_is_dirty() invocation

2021-12-02 Thread Jan Beulich
On 01.12.2021 19:33, Andrew Cooper wrote: > On 01/12/2021 10:35, Jan Beulich wrote: >> paging_mfn_is_dirty() is moderately expensive, so avoid its use unless >> its result might actually change anything. This means moving the >> surrounding if() down below all other checks that can result in

Re: [PATCH 1/2] x86/shadow: defer/avoid paging_mfn_is_dirty() invocation

2021-12-01 Thread Andrew Cooper
On 01/12/2021 10:35, Jan Beulich wrote: > paging_mfn_is_dirty() is moderately expensive, so avoid its use unless > its result might actually change anything. This means moving the > surrounding if() down below all other checks that can result in clearing > _PAGE_RW from sflags, in order to then

[PATCH 1/2] x86/shadow: defer/avoid paging_mfn_is_dirty() invocation

2021-12-01 Thread Jan Beulich
paging_mfn_is_dirty() is moderately expensive, so avoid its use unless its result might actually change anything. This means moving the surrounding if() down below all other checks that can result in clearing _PAGE_RW from sflags, in order to then check whether _PAGE_RW is actually still set there