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

Re: [Xen-devel] [PATCH RFC V2 37/45] x86: optimize loading of GDT at context switch



>>> On 06.05.19 at 08:56, <jgross@xxxxxxxx> wrote:
> Instead of dynamically decide whether the previous vcpu was using full
> or default GDT just add a percpu variable for that purpose. This at
> once removes the need for testing vcpu_ids to differ twice.
> 
> Cache the need_full_gdt(nd) value in a local variable.
> 
> Signed-off-by: Juergen Gross <jgross@xxxxxxxx>

To be honest I'm not entirely convinced this is a good move. But
since you've done the work, and since the larger source size is
hopefully outweighed by slightly smaller binary size (per-CPU
data accesses aren't entirely cheap either), I'm not going to
object.

> @@ -1658,6 +1664,7 @@ static void __context_switch(void)
>      struct vcpu          *n = current;
>      struct domain        *pd = p->domain, *nd = n->domain;
>      seg_desc_t           *gdt;
> +    bool                  need_full_gdt_n;

This variable is too long, or more precisely has too many underscores
for my taste. Seeing that only a single invocation of need_full_gdt()
remains, I don't think just "full_gdt" would be ambiguous in any way.
At which point
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>

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®.