|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCHv4 8/8] x86: reduce struct hvm_domain size
>>> On 30.04.15 at 17:33, <david.vrabel@xxxxxxxxxx> wrote:
> Pack struct hvm_domain to reduce it by 8 bytes. Thus reducing the
> size of struct domain by 8 bytes.
Is that really true _after_ the change to ticket locks?
> --- a/xen/include/asm-x86/hvm/domain.h
> +++ b/xen/include/asm-x86/hvm/domain.h
> @@ -116,12 +116,6 @@ struct hvm_domain {
> /* VRAM dirty support. Protect with the domain paging lock. */
> struct sh_dirty_vram *dirty_vram;
>
> - /* If one of vcpus of this domain is in no_fill_mode or
> - * mtrr/pat between vcpus is not the same, set is_in_uc_mode
> - */
> - spinlock_t uc_lock;
> - bool_t is_in_uc_mode;
> -
> /* Pass-through */
> struct hvm_iommu hvm_iommu;
Here the block sits between two 8-byte aligned fields.
> @@ -137,6 +131,12 @@ struct hvm_domain {
> bool_t is_s3_suspended;
> bool_t introspection_enabled;
>
> + /* If one of vcpus of this domain is in no_fill_mode or
> + * mtrr/pat between vcpus is not the same, set is_in_uc_mode
> + */
> + bool_t is_in_uc_mode;
> + spinlock_t uc_lock;
> +
> /*
> * TSC value that VCPUs use to calculate their tsc_offset value.
> * Used during initialization and save/restore.
And here it follows 5 bool_t-s, and is being followed by an 8-byte
aligned field. I.e. without ticket locks it exactly fills the 3 byte gap,
but with ticket locks it requires a second 8-byte slot.
Additionally I wonder whether the reduced distance between
uc_lock and msixtbl_list_lock would now lead to (or, going forward,
at least risk) them being on the same cache line.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |