|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 13/13] xen/arm: Avoid to use current everywhere in enter_hypervisor_head
Hi Stefano, On 24/05/18 00:47, Stefano Stabellini wrote: On Tue, 22 May 2018, Julien Grall wrote:Using current is fairly expensive, so save up into a variable. Signed-off-by: Julien Grall <julien.grall@xxxxxxx>Good idea. I am curious to know actually how much this patch would save but I am not going to ask you run the tests. I haven't benchmark it but looked at the resulting assembly code. This reduces by about ~20% the number of instructions in the function. AFAIU, this is because of the way per-cpu access have been implemented. The per-cpu offset is stored in a system register (TPIDR_EL2), all the read to it cannot be optimized (access using volatile). So every direct use of "current" will require at least a system register access and then a load from memory. Cheers, Reviewed-by: Stefano Stabellini <sstabellini@xxxxxxxxxx> -- Julien Grall _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |