From: Tim Deegan Subject: Re: [PATCHv4 5/5] x86: reduce struct hvm_domain size Date: Thu, 14 May 2015 12:24:35 +0100 Message-ID: <20150514112435.GF81528@deinos.phlegethon.org> References: <1431355025-20468-1-git-send-email-david.vrabel@citrix.com> <1431355025-20468-6-git-send-email-david.vrabel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YsrFm-0005LJ-T0 for xen-devel@lists.xenproject.org; Thu, 14 May 2015 11:24:39 +0000 Content-Disposition: inline In-Reply-To: <1431355025-20468-6-git-send-email-david.vrabel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: David Vrabel Cc: Keir Fraser , Ian Campbell , Andrew Cooper , Jennifer Herbert , Jan Beulich , xen-devel@lists.xenproject.org List-Id: xen-devel@lists.xenproject.org At 15:37 +0100 on 11 May (1431358625), David Vrabel wrote: > Pack struct hvm_domain to reduce it by 8 bytes. Thus reducing the > size of struct domain by 8 bytes. In my builds (non-debug, on current staging), this makes no difference to struct domain. struct hvm_domain gets 8 bytes smaller (2144 -> 2136), but struct arch_domain remains at 2944 bytes (it just gets an extra 8 bytes in the padding at the end to round it up to __cacheline_aligned). Tim. > Signed-off-by: David Vrabel > --- > xen/include/asm-x86/hvm/domain.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/xen/include/asm-x86/hvm/domain.h b/xen/include/asm-x86/hvm/domain.h > index 0f8b19a..fb30903 100644 > --- a/xen/include/asm-x86/hvm/domain.h > +++ b/xen/include/asm-x86/hvm/domain.h > @@ -115,12 +115,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; > > @@ -135,6 +129,12 @@ struct hvm_domain { > bool_t qemu_mapcache_invalidate; > bool_t is_s3_suspended; > > + /* 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. > -- > 1.7.10.4 >