Re: [PATCH] taskstats: Use better ifdef for alignment

From: Florian Mickler
Date: Sun Jan 02 2011 - 07:17:59 EST


On Sat, 1 Jan 2011 19:51:35 +0300
Dan Carpenter <error27@xxxxxxxxx> wrote:

> On Sat, Jan 01, 2011 at 05:19:46PM +0100, Florian Mickler wrote:
> > Is there already a patch available or integrated into iotop which
> > fixes this? I'd think that if the kernel could wait on fixed iotop's to
> > be distributed it would be easier to sell the breakage on bugzilla &
> > co...
> >
>
> The story is that 4be2c95d1f "taskstats: pad taskstats netlink response
> for aligment issues on ia64" broke iotop on 64 bit processors (32 bit
> was unaffected). This patch fixes it for x86-64 and powerpc-64.
>
> On the other 64 bit processors iotop works but instead you get a message
> in dmesg:
> kernel unaligned access to 0xe000023879dca9bc, ip=0xa000000100133d10
>
> So on those arches you were already getting posts to bugzilla etc. Now
> those people can upgrade the kernel and download iotop version 0.4.2 or
> higher.
>
> regards,
> dan carpenter
>

Ah ok. And probably bug #24272 is related to this. If I
understood it correctly 85893120 fixed some runtime warnings (or more
exactly the misaligning) and broke iotop in the process (on all of 64
bit).

4be2c95d1f undid that and enhanced the netlink messages on IA64
archs with a new type to fix the alignment and now it's changed to
align well on all archs that need alignment, leaving archs unbroken that
have efficient unaligned access (x86-64 and powerpc-64). Nice.

And to answer my original question, i just checked out (some?/the?)
iotop sources from git://repo.or.cz/iotop.git and found a fix[1] for the
issue with 85893120.

Is iotop parsing fixed to ignore the null-field in the meantime?

Thx,
Flo

[1]git://repo.or.cz/iotop.git:commit 08211d209ae8fc7e67ea3bebb09979ff61c70f97
Author: Guillaume Chazarain <guichaz@xxxxxxxxx>
Date: Sat Sep 4 13:57:43 2010 +0200

Instead of assuming the pid field is 4 bytes long, take its length from the header.
This is needed for http://lkml.org/lkml/2010/2/12/167
[PATCH] delayacct: align to 8 byte boundary on 64-bit systems
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/