[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC 01/55] x86/mm: defer clearing page in virt_to_xen_lXe



>>> On 07.02.19 at 17:44, <wei.liu2@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.