* [ath9k-devel] unaligned accesses
@ 2010-03-22 18:09 Matteo Croce
2010-03-22 21:49 ` Pavel Roskin
0 siblings, 1 reply; 5+ messages in thread
From: Matteo Croce @ 2010-03-22 18:09 UTC (permalink / raw)
To: ath9k-devel
I'm using ath9k on a MIPS platform, and the driver seems to do _lot_ of
unaligned accesses, something like 270.000/sec
the following happens while running an iperf at 1 Mbit.
note how the unaligned accesses is always multiple of 18
root@(none):/# cat /bin/unalign_count
#!/bin/sh
u=$(cat /sys/kernel/debug/mips/unaligned_instructions)
while sleep 1; do
n=$(cat /sys/kernel/debug/mips/unaligned_instructions)
echo "$(($n - $u)) unaligned access"
u=$n
done
root@(none):/# unalign_count
0 unaligned access
0 unaligned access
0 unaligned access
702 unaligned access <-- iperf start
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1530 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1530 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1530 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1530 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1548 unaligned access
1530 unaligned access
1548 unaligned access
1548 unaligned access
1440 unaligned access
1530 unaligned access
1530 unaligned access
1530 unaligned access
1530 unaligned access
198 unaligned access <-- iperf stop
0 unaligned access
0 unaligned access
0 unaligned access
0 unaligned access
0 unaligned access
--
Matteo Croce
OpenWrt developer
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (bleeding edge) ------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
^ permalink raw reply [flat|nested] 5+ messages in thread* [ath9k-devel] unaligned accesses
2010-03-22 18:09 [ath9k-devel] unaligned accesses Matteo Croce
@ 2010-03-22 21:49 ` Pavel Roskin
2010-03-22 23:22 ` Luca Niccoli
0 siblings, 1 reply; 5+ messages in thread
From: Pavel Roskin @ 2010-03-22 21:49 UTC (permalink / raw)
To: ath9k-devel
On Mon, 2010-03-22 at 19:09 +0100, Matteo Croce wrote:
> I'm using ath9k on a MIPS platform, and the driver seems to do _lot_ of
> unaligned accesses, something like 270.000/sec
My first reaction was to reproduce it, but the only mips system I have
is a La Fonera router, which has no PCI.
I checked if it's possible to enable alignment checking on x86_64, but
it looks like gcc would use unaligned access on its own to initialize
data, so there will be massive false positives:
http://stackoverflow.com/questions/1929588/x86-howto-catch-data-alignment-faults-aka-sigbus-on-sparc
> u=$(cat /sys/kernel/debug/mips/unaligned_instructions)
I checked the sources for "unaligned_instructions" and found
"unaligned_action" nearby. If set to 2 (UNALIGNED_ACTION_SHOW), it
would print registers, and then perhaps you could find the exact
location in the kernel.
--
Regards,
Pavel Roskin
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ath9k-devel] unaligned accesses
2010-03-22 21:49 ` Pavel Roskin
@ 2010-03-22 23:22 ` Luca Niccoli
2010-03-23 0:18 ` Luca Niccoli
0 siblings, 1 reply; 5+ messages in thread
From: Luca Niccoli @ 2010-03-22 23:22 UTC (permalink / raw)
To: ath9k-devel
On 22 March 2010 22:49, Pavel Roskin <proski@gnu.org> wrote:
>> I'm using ath9k on a MIPS platform, and the driver seems to do _lot_ of
>> unaligned accesses, something like 270.000/sec
I checked and I'm seeing a whole lot of unaligned accesses on my
openWRT router as well.
> I checked the sources for "unaligned_instructions" and found
> "unaligned_action" nearby. ?If set to 2 (UNALIGNED_ACTION_SHOW), it
> would print registers, and then perhaps you could find the exact
> location in the kernel.
I tried twice, but the router once freezed and once rebooted instantly.
I tried to pass -Wcast-align to OpenWRT cross-compiler, and I got a
heap of "warning: cast increases required alignment of target type"
Interestingly, none of them belonged to ath9k though...
Cheers,
Luca
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ath9k-devel] unaligned accesses
2010-03-22 23:22 ` Luca Niccoli
@ 2010-03-23 0:18 ` Luca Niccoli
2010-03-23 7:03 ` Benoit PAPILLAULT
0 siblings, 1 reply; 5+ messages in thread
From: Luca Niccoli @ 2010-03-23 0:18 UTC (permalink / raw)
To: ath9k-devel
On 23 March 2010 00:22, Luca Niccoli <lultimouomo@gmail.com> wrote:
> I tried twice, but the router once freezed and once rebooted instantly.
I guess it's worth saying that I can only log in through SSH, maybe
access to a serial console would let the error messages through.
Matteo, do you have the chance to give it a try?
Cheers,
Luca
^ permalink raw reply [flat|nested] 5+ messages in thread
* [ath9k-devel] unaligned accesses
2010-03-23 0:18 ` Luca Niccoli
@ 2010-03-23 7:03 ` Benoit PAPILLAULT
0 siblings, 0 replies; 5+ messages in thread
From: Benoit PAPILLAULT @ 2010-03-23 7:03 UTC (permalink / raw)
To: ath9k-devel
Luca Niccoli a ?crit :
> On 23 March 2010 00:22, Luca Niccoli <lultimouomo@gmail.com> wrote:
>
>
>> I tried twice, but the router once freezed and once rebooted instantly.
>>
>
> I guess it's worth saying that I can only log in through SSH, maybe
> access to a serial console would let the error messages through.
> Matteo, do you have the chance to give it a try?
>
> Cheers,
>
> Luca
>
On mine, I got 39000 unaligned access per second when doing an iperf
over ethernet, without ath9k being loaded... Using echo 2 >
/sys/kernel/debug/mips/unaligned_action rebooted the router.
Regards,
Benoit
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-03-23 7:03 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-22 18:09 [ath9k-devel] unaligned accesses Matteo Croce
2010-03-22 21:49 ` Pavel Roskin
2010-03-22 23:22 ` Luca Niccoli
2010-03-23 0:18 ` Luca Niccoli
2010-03-23 7:03 ` Benoit PAPILLAULT
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.