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

Re: [Xen-devel] How come same structure has different sizes for dom0 and domU



* Lily Huang (ushuanglily@xxxxxxxxx) wrote:
> in Dom0:
> dentry: 128 bytes
> inode:  312 bytes
> 
> in DomU:
> dentry: 132 bytes
> inode:   344 bytes
> 
> How could this happen? Is there any way to make them same?

Could be for many reasons.  The most likely is .config differences
(additional debugging or features set can increase the size of a
structure like that).  Since you didn't specify the source, could also
be that the base source is from different versions.

Here's some simple examples:

struct dentry {
        ...
        spinlock_t d_lock;
        ...
#ifdef CONFIG_PROFILING
        struct dcookie_struct *d_cookie; /* cookie, if any */
#endif
        ...
};

typedef struct {
        ...
#if defined(CONFIG_PREEMPT) && defined(CONFIG_SMP)
        unsigned int break_lock;
#endif
        ...
} spinlock_t;

So either CONFIG_PROFILING or CONFIG_PREEMPT && CONFIG_SMP would add
those 4 bytes to the struct.

thanks,
-chris

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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