Lily Huang
2006-Jun-09 19:55 UTC
[Xen-devel] How come same structure has different sizes for dom0 and domU
I found that dentry and inode have different sizes in Dom0 and domU. In particular, 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? lily _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Chris Wright
2006-Jun-09 20:26 UTC
Re: [Xen-devel] How come same structure has different sizes for dom0 and domU
* Lily Huang (ushuanglily@gmail.com) 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@lists.xensource.com http://lists.xensource.com/xen-devel