[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] x86/cpu: Improvements to get_cpu_vendor()
>>> On 03.01.17 at 13:06, <andrew.cooper3@xxxxxxxxxx> wrote: > Comparing 3 integers is more efficient than using strcmp(), and is more useful > to the gcv_guest case than having to fabricate a suitable string to pass. The > gcv_host cases have both options easily to hand, and experimentally, the > resulting code is more efficient. > > While modifying get_cpu_vendor(), fix a bug where this_cpu got updated even in > the gcv_guest case. Isn't this something we'd better fix separately, to ease backporting? > Update the cpu_dev structure to be more efficient. c_vendor[] only needs to > be 8 bytes long to cover all the CPU drivers Xen has, which avoids storing an > 8-byte pointer to 8 bytes of data. Drop c_ident[1] as we have no CPU drivers > with a second ident string, and turn it into a transparent union to allow > access to the integer values directly. I think "transparent" is misleading here, as you don't add the respective gcc attribute. I think you mean "unnamed". > This avoids all need for the vendor_id union in update_domain_cpuid_info(). > > Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx> For the patch itself Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx> Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |