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

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



On 29/01/16 17:09, Jan Beulich wrote:
>>>> On 29.01.16 at 17:24, <czuzu@xxxxxxxxxxxxxxx> 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 = 4096 bytes (= PAGE_SIZE)
>>      * sizeof(struct arch_domain) [x86] = sizeof(domain.arch) = 3328 
>> bytes (arch_domain is marked __cacheline_aligned, i.e. aligned to 128 bytes)
>>      * sizeof(domain.arch.hvm_domain) = 2224 bytes
>>      * sizeof(domain.arch.hvm_domain.pl_time) = 1088 bytes
>>
>> => overall, X86 timers-related information occupies the most.
>>
>> 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 called.
> Sounds like a reasonable measure. I wasn't aware we're exactly on
> the boundary right now.

It has been teatering on the edge for a while now.

I keep on meaning to see about sliming it down somewhat (probably by
pulling an optional structure out into an explicit allocation), but
haven't had the time.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.