From: Christian Lamparter <chunkeey@googlemail.com>
To: David Miller <davem@davemloft.net>
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 22:46:30 +0200 [thread overview]
Message-ID: <201009222246.31687.chunkeey@googlemail.com> (raw)
In-Reply-To: <20100922.121902.71115228.davem@davemloft.net>
On Wednesday 22 September 2010 21:19:02 David Miller wrote:
> 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.
> > (don't kill the reasons)!
>
> 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.
Well, if you only care about "performance" then I have good news!
Because the only __packed structs that are important for us in the
tx & rx hot-paths are the two hardware tx/rx descriptors in wlan.h.
Everything else is boring. e.g.:
* The firmware descriptor is only important at boot-time
(parsing the firmware is really fast, compared to the "second"
we have to wait for the device to boot)
* Firmware commands are (apart from the first init and channel change)
very rarely issued during operation.
In fact the most "critical thing" is switching on/off
the LEDs (of course this is done by a workqueue item, so
you probably get the idea)
so almost everything can stay the way it is. The only thing that needs
to be change (according to you concern) is hardwired into the chip....
But the driver can try to minimizes the access to unaligned elements,
by using temporary variables (so the value needs to be accessed only
once). In fact that's already done, the only room for improvement
would be in carl9170_tx_prepare (temporary u16 for mac_control,
u8 super_misc, u8 rate_info).
next prev parent reply other threads:[~2010-09-22 20:46 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
2010-09-22 20:46 ` Christian Lamparter [this message]
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=201009222246.31687.chunkeey@googlemail.com \
--to=chunkeey@googlemail.com \
--cc=davem@davemloft.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).