From: "Jörn Engel" <joern@logfs.org>
To: Stephen Hemminger <shemminger@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>,
virtualization@lists.linux-foundation.org,
Greg Kroah-Hartman <gregkh@suse.de>,
linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org,
virtualization@lists.osdl.org, Sam Ramji <sramji@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Hank Janssen <hjanssen@microsoft.com>
Subject: Re: [patch 34/54] Staging: hv: remove STRUCT_PACKED and STRUCT_ALIGNED defines
Date: Sat, 25 Jul 2009 01:06:20 +0200 [thread overview]
Message-ID: <20090724230619.GB13702@logfs.org> (raw)
In-Reply-To: <20090724145025.12da5a6e@nehalam>
On Fri, 24 July 2009 14:50:25 -0700, Stephen Hemminger wrote:
> On Fri, 24 Jul 2009 23:32:19 +0200
> Jörn Engel <joern@logfs.org> wrote:
>
> > On Tue, 21 July 2009 01:46:41 +0200, Arnd Bergmann wrote:
> > >
> > > The data structure is actually packed already, the attribute does not make it better
> > > and could be removed. We also have __packed as a shortcut for __attribute__((packed)).
> >
> > Honestly, I don't know how useful __packed really is. In a shared
> > kernel/userspace header, it is only defined for the kernel.
>
> As I remember, gcc generates worse code for packed structures on many architectures
> since it may have to do byte fetchs/recombining to avoid unaligned
> accesses.
I was talking about "__packed" vs. "__attribute__((packed))". But yes,
avoiding packed structures where possible is a good idea.
Jörn
--
"[One] doesn't need to know [...] how to cause a headache in order
to take an aspirin."
-- Scott Culp, Manager of the Microsoft Security Response Center, 2001
next prev parent reply other threads:[~2009-07-24 23:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20090717180850.873962925@mini.kroah.org>
[not found] ` <20090717180923.620590305@mini.kroah.org>
2009-07-20 23:39 ` [patch 47/54] Staging: hv: make gVmbusConnection.ChannelLock a real spinlock Arnd Bergmann
2009-07-21 2:11 ` Greg KH
[not found] ` <20090717180921.448023599@mini.kroah.org>
2009-07-20 23:46 ` [patch 34/54] Staging: hv: remove STRUCT_PACKED and STRUCT_ALIGNED defines Arnd Bergmann
2009-07-24 21:32 ` Jörn Engel
2009-07-24 21:50 ` Stephen Hemminger
2009-07-24 23:06 ` Jörn Engel [this message]
[not found] ` <20090717180920.285605541@mini.kroah.org>
2009-07-21 0:00 ` [patch 27/54] Staging: hv: remove ULONG and LONG typedefs Arnd Bergmann
2009-07-21 0:44 ` Hank Janssen
2009-07-21 2:38 ` Greg KH
2009-07-21 2:45 ` Greg KH
2009-07-21 8:26 ` Bernd Petrovitsch
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=20090724230619.GB13702@logfs.org \
--to=joern@logfs.org \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@suse.de \
--cc=haiyangz@microsoft.com \
--cc=hjanssen@microsoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=shemminger@linux-foundation.org \
--cc=sramji@microsoft.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=virtualization@lists.osdl.org \
/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