lkml.org 
[lkml]   [2014]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: DNAME_INLINE_LEN versus CONFIG_GENERIC_LOCKBREAK
On Thu, Jul 03, 2014 at 12:53:01PM -0700, Andi Kleen wrote:
> Rasmus Villemoes <linux@rasmusvillemoes.dk> writes:
>
> > In dcache.h, DNAME_INLINE_LEN is carefully chosen so that sizeof(struct
> > dentry) is a (specific) multiple of 64 bytes. Obviously this breaks when
> > certain debug options are chosen (DEBUG_LOCK_ALLOC and DEBUG_SPINLOCK),
> > but also, AFAICT, on architectures with CONFIG_GENERIC_LOCKBREAK.
> >
> > I'm not sure it matters, but if it does, I'd suggest putting a
> > BUILD_BUG_ON somewhere, protected by suitable #ifdefs, so that the code
> > documents the assumptions that went into the particular choice of
> > DNAME_INLINE_LEN (this would also help catch changes to some of the
> > structures embedded in struct dentry which would violate those
> > assumptions).
>
> The right fix would be to pad it correctly for these other variants
> too.

IF you've turned on debugging options, then you've already lost more
performance that careful packing of the dentry slab cache gains you.
There's no point in carefully tuning DNAME_INLINE_LEN for debug
options - it's just code that will break and annoy people as debug
implementations change.

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com


\
 
 \ /
  Last update: 2014-07-04 04:21    [W:0.257 / U:0.296 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site