From: David Miller <davem@davemloft.net>
To: chunkeey@googlemail.com
Cc: linville@tuxdriver.com, linux-wireless@vger.kernel.org
Subject: Re: pull request: wireless-next-2.6 2010-09-21
Date: Wed, 22 Sep 2010 12:19:02 -0700 (PDT) [thread overview]
Message-ID: <20100922.121902.71115228.davem@davemloft.net> (raw)
In-Reply-To: <201009222054.05469.chunkeey@googlemail.com>
From: Christian Lamparter <chunkeey@googlemail.com>
Date: Wed, 22 Sep 2010 20:54:05 +0200
> Only the structs which deal with hardware (hw.h, eeprom.h, wlan.h)
> or firmware (fwcmd.h, fwdesc.h & wlan.h) interface have the
> __packed attribute. And there are several good reasons.
There is a cost in being lazy and just stabbing __packed to every
structure shared with firmware or hardware.
And that cost is that every larger-than-byte sized element will be
loaded with a disgustingly expensive series of byte loads, shifts,
and masks.
Every access.
This is because GCC is not allowed to assume the alignment of any
structure marked with __packed. Therefore only byte sized loads are
safe on architectures that require types be aligned to their size.
This really is a performance issue, otherwise I frankly wouldn't
care where you put __packed.
So please minimize the annotations to only the structures that
actually require __packed, not those that "might."
next prev parent reply other threads:[~2010-09-22 19:18 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-21 20:17 pull request: wireless-next-2.6 2010-09-21 John W. Linville
2010-09-22 1:36 ` David Miller
2010-09-22 9:58 ` Christian Lamparter
2010-09-22 10:01 ` Johannes Berg
2010-09-22 10:27 ` Christian Lamparter
2010-09-22 10:34 ` Johannes Berg
2010-09-22 11:09 ` Christian Lamparter
2010-09-22 16:22 ` David Miller
2010-09-22 18:54 ` Christian Lamparter
2010-09-22 19:19 ` David Miller [this message]
2010-09-22 20:46 ` Christian Lamparter
2010-09-22 20:57 ` David Miller
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=20100922.121902.71115228.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=chunkeey@googlemail.com \
--cc=linux-wireless@vger.kernel.org \
--cc=linville@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.