[Top] [All Lists]

Re: [Patch] Cacheline align xlog_t

To: Lachlan McIlroy <lachlan@xxxxxxx>
Subject: Re: [Patch] Cacheline align xlog_t
From: David Chinner <dgc@xxxxxxx>
Date: Wed, 2 Apr 2008 15:44:03 +1000
Cc: David Chinner <dgc@xxxxxxx>, xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <47F3293C.6090708@xxxxxxx>
References: <20080401231552.GV103491721@xxxxxxx> <47F3293C.6090708@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/
On Wed, Apr 02, 2008 at 04:35:40PM +1000, Lachlan McIlroy wrote:
> >*/
> >-    uint                    l_sectbb_log;   /* log2 of sector size in 
> >BBs */
> >-    uint                    l_sectbb_mask;  /* sector size (in BBs)
> >-                                             * alignment mask */
> >-} xlog_t;
> >+
> >+    /* The following field are used for debugging; need to hold 
> >icloglock */
> >+#ifdef DEBUG
> >+    char                    *l_iclog_bak[XLOG_MAX_ICLOGS];
> >+#endif
> >+
> >+} xlog_t ____cacheline_aligned_in_smp;
> Is it necessary to add a ____cacheline_aligned_in_smp tag here?  The 
> important sections of the xlog_t structure are already tagged.

This just means that the start of the structure is cacheline
aligned.  I don't think the internal alignment commands force the
entire structure to be cacheline aligned, merely pad the struture
internally. In that case, even though the specific internal parts of
the structure are on separate cache lines, there's no guarantee that
all the related members are on the same cacheline. Hence I'm
explicitly stating the exact alignment I want for the structure....


Dave Chinner
Principal Engineer
SGI Australian Software Group

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