WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: Lily Huang <ushuanglily@xxxxxxxxx>
Subject: Re: [Xen-devel] How come same structure has different sizes for dom0 and domU
From: Chris Wright <chrisw@xxxxxxxxxxxx>
Date: Fri, 9 Jun 2006 13:26:26 -0700
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 09 Jun 2006 13:24:03 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <4d616cca0606091255o7f2f15e3xc2aac3f446dedaba@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4d616cca0606091255o7f2f15e3xc2aac3f446dedaba@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
* 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

<Prev in Thread] Current Thread [Next in Thread>