public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@turbolabs.com>
To: Andi Kleen <ak@suse.de>
Cc: Manfred Spraul <manfred@colorfullife.com>, linux-kernel@vger.kernel.org
Subject: Re: optimize DNAME_INLINE_LEN
Date: Thu, 13 Dec 2001 17:03:50 -0700	[thread overview]
Message-ID: <20011213170350.G940@lynx.no> (raw)
In-Reply-To: <3C192A37.4547D2A7@colorfullife.com> <20011213160706.E940@lynx.no> <20011214002957.A24984@wotan.suse.de>
In-Reply-To: <20011214002957.A24984@wotan.suse.de>; from ak@suse.de on Fri, Dec 14, 2001 at 12:29:57AM +0100

On Dec 14, 2001  00:29 +0100, Andi Kleen wrote:
> On Thu, Dec 13, 2001 at 04:07:06PM -0700, Andreas Dilger wrote:
> > Alternately (also ugly) you could just define struct dentry the as now,
> > but have a fixed size declaration for d_iname, like:
> > 
> > #define DNAME_INLINE_MIN 16
> > 
> > 	unsigned char d_iname[DNAME_INLINE_MIN];
>                    Using [0] here would also work 

Well, not really.  If we wanted to have a minimum size for the d_iname
field, then if we declare it as zero and it just squeaks into a chacheline,
then we may be stuck with 0 bytes of inline names, and _all_ names will
be kmalloced.

> #define d_... has a similar problem => the potential to break previously
> compiling source code.

Again, not really.  The #define d_... scheme would leave all of the fields
in their original locations, just giving them new names within the named
struct, and the defines would be the backwards compatible (and probably
still preferrable) way to access these fields.  I don't _think_ it would
cause any compiler struct alignment issues to just put the same fields
in another struct, but I could be wrong.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/


  reply	other threads:[~2001-12-14  0:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-13 22:22 optimize DNAME_INLINE_LEN Manfred Spraul
2001-12-13 23:07 ` Andreas Dilger
2001-12-13 23:24   ` Manfred Spraul
2001-12-13 23:29   ` Andi Kleen
2001-12-14  0:03     ` Andreas Dilger [this message]
2001-12-14  0:10       ` Andi Kleen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20011213170350.G940@lynx.no \
    --to=adilger@turbolabs.com \
    --cc=ak@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=manfred@colorfullife.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox