Re: [Xen-devel] X86 arch_domain ginormous, sizeof(struct domain) already == PAGE_SIZE

2016-01-30 Thread Lengyel, Tamas
On Fri, Jan 29, 2016 at 2:32 PM, Corneliu ZUZU wrote: > On 1/29/2016 6:47 PM, Lengyel, Tamas wrote: > > > by leaving there only the x86-specific part, i.e.: >> struct { >> uint8_t mov_to_msr_enabled : 1; >> uint8_t mov_to_msr_extended

[Xen-devel] X86 arch_domain ginormous, sizeof(struct domain) already == PAGE_SIZE

2016-01-29 Thread Corneliu ZUZU
I'm trying to refactor some arch-specific code into common code and was surprised to find out that the x86 domain structure already occupies PAGE_SIZE bytes, couldn't even add an unsigned short field in it w/o causing a compile-time error. I'm using the master branch of

Re: [Xen-devel] X86 arch_domain ginormous, sizeof(struct domain) already == PAGE_SIZE

2016-01-29 Thread Lengyel, Tamas
> by leaving there only the x86-specific part, i.e.: > struct { > uint8_t mov_to_msr_enabled : 1; > uint8_t mov_to_msr_extended : 1; > } monitor; > > and moving the rest directly into the domain structure, i.e. add @ the end > of struct domain [@

Re: [Xen-devel] X86 arch_domain ginormous, sizeof(struct domain) already == PAGE_SIZE

2016-01-29 Thread Jan Beulich
>>> On 29.01.16 at 17:24, wrote: > To investigate I compiled the unaltered domain.c & used the pahole tool > (part of dwarves package) to obtain the complete layout of the domain > structure (& its members). > What I obtained: > * sizeof(struct domain) is already =

Re: [Xen-devel] X86 arch_domain ginormous, sizeof(struct domain) already == PAGE_SIZE

2016-01-29 Thread Andrew Cooper
On 29/01/16 17:09, Jan Beulich wrote: On 29.01.16 at 17:24, wrote: >> To investigate I compiled the unaltered domain.c & used the pahole tool >> (part of dwarves package) to obtain the complete layout of the domain >> structure (& its members). >> What I obtained: >>

Re: [Xen-devel] X86 arch_domain ginormous, sizeof(struct domain) already == PAGE_SIZE

2016-01-29 Thread Corneliu ZUZU
On 1/29/2016 6:47 PM, Lengyel, Tamas wrote: by leaving there only the x86-specific part, i.e.: struct { uint8_t mov_to_msr_enabled : 1; uint8_t mov_to_msr_extended : 1; } monitor; and moving the rest directly into the domain

Re: [Xen-devel] X86 arch_domain ginormous, sizeof(struct domain) already == PAGE_SIZE

2016-01-29 Thread Corneliu ZUZU
On 1/29/2016 7:09 PM, Jan Beulich wrote: On 29.01.16 at 17:24, wrote: One could shrink the domain structure by transforming some of its fields to pointers, e.g. I could transform the pl_time field into a pointer and dynamically allocate its data when domain_create is