[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20070604140212.GA15926@lazybastard.org>
Date: Mon, 4 Jun 2007 16:02:13 +0200
From: Jörn Engel <joern@...ybastard.org>
To: David Woodhouse <dwmw2@...radead.org>
Cc: Arnd Bergmann <arnd@...db.de>, linux-fsdevel@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-mtd@...ts.infradead.org,
akpm@...l.org, Sam Ravnborg <sam@...nborg.org>,
John Stoffel <john@...ffel.org>,
Jamie Lokier <jamie@...reable.org>,
Artem Bityutskiy <dedekind@...radead.org>,
CaT <cat@....com.au>, Jan Engelhardt <jengelh@...ux01.gwdg.de>,
Evgeniy Polyakov <johnpol@....mipt.ru>,
David Weinehall <tao@....umu.se>, Willy Tarreau <w@....eu>,
Kyle Moffett <mrmacman_g4@....com>,
Dongjun Shin <djshin90@...il.com>, Pavel Machek <pavel@....cz>,
Bill Davidsen <davidsen@....com>,
Thomas Gleixner <tglx@...utronix.de>,
Albert Cahalan <acahalan@...il.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Roland Dreier <rdreier@...co.com>,
Ondrej Zajicek <santiago@...reenet.org>,
Ulisses Furquim <ulissesf@...il.com>
Subject: Re: [Patch 04/18] include/linux/logfs.h
On Mon, 4 June 2007 14:38:23 +0100, David Woodhouse wrote:
> On Mon, 2007-06-04 at 11:12 +0200, Jörn Engel wrote:
> > On Sun, 3 June 2007 23:42:25 +0200, Arnd Bergmann wrote:
> > > On Sunday 03 June 2007, Jörn Engel wrote:
> > > > +struct logfs_je_spillout {
> > > > + __be64 so_segment[0];
> > > > +}__packed;
> > >
> > > All the on-disk data structures you define in this file have naturally
> > > aligned members, so the __packed attribute is not needed.
> >
> > Amen. It is purely paranoia and I don't even know who is out to get me.
>
> You can _never_ know who is out to get you, or what architecture we'll
> be ported to next week.
>
> The advice "don't tell the compiler what you want unless you _know_
> it'll do the wrong thing otherwise" runs counter to everything we've
> learned, slowly and painfully, over the last few years.
>
> We should never rely on compiler behaviour which is undocumented and
> unrequired. Even if you know that the ABI forces it to continue to do
> the right thing on the platforms you _currently_ care about, it might
> not do it on new platforms (or existing platforms you didn't manage to
> test).
>
> It would be better if GCC had a 'nopadding' attribute which gave us what
> we need without the _extra_ implications about alignment. In the absence
> of that, though, you should at _least_ have a check on the size of the
> structure if you're doing to drop the packed attribute.
Adding a size check is simple enough. But given all this I'll put it to
the very end of my todo list. There are many other optimizations
remaining.
Jörn
--
Joern's library part 14:
http://www.sandpile.org/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists