>>> On 07.02.19 at 17:44, <wei.l...@citrix.com> wrote:
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -4752,13 +4752,13 @@ static l3_pgentry_t *virt_to_xen_l3e(unsigned long v)
>  
>          if ( !pl3e )
>              return NULL;
> -        clear_page(pl3e);
>          if ( locking )
>              spin_lock(&map_pgdir_lock);
>          if ( !(l4e_get_flags(*pl4e) & _PAGE_PRESENT) )
>          {
>              l4_pgentry_t l4e = l4e_from_paddr(__pa(pl3e), __PAGE_HYPERVISOR);
>  
> +            clear_page(pl3e);

Is this really an optimization? You treat avoiding to clear the page
in a hopefully infrequent case of a race for holding the spin lock
for quite a bit longer.

Jan



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to