public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* taskstats alignment...
@ 2010-12-23 17:30 David Miller
  2010-12-24 18:45 ` Jeff Mahoney
  0 siblings, 1 reply; 4+ messages in thread
From: David Miller @ 2010-12-23 17:30 UTC (permalink / raw)
  To: jeffm; +Cc: linux-kernel


Re: commit 4be2c95d1f7706ca0e74499f2bd118e1cee19669

Pretty much every 64-bit architecture other than
powerpc64 and x86-64 needs that code, not just
IA64.

Better check would be:

CONFIG_64BIT && !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS

Otherwise we'll be twiddling that ifdef endlessly as each
and every other 64-bit platform bumps into this issue.

So please could you change this to use a more sane check?

Thanks!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: taskstats alignment...
  2010-12-23 17:30 taskstats alignment David Miller
@ 2010-12-24 18:45 ` Jeff Mahoney
  2010-12-24 21:16   ` Dan Carpenter
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Mahoney @ 2010-12-24 18:45 UTC (permalink / raw)
  To: David Miller; +Cc: linux-kernel, balbir, Andrew Morton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/23/2010 12:30 PM, David Miller wrote:
> 
> Re: commit 4be2c95d1f7706ca0e74499f2bd118e1cee19669
> 
> Pretty much every 64-bit architecture other than
> powerpc64 and x86-64 needs that code, not just
> IA64.
> 
> Better check would be:
> 
> CONFIG_64BIT && !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
> 
> Otherwise we'll be twiddling that ifdef endlessly as each
> and every other 64-bit platform bumps into this issue.
> 
> So please could you change this to use a more sane check?

I don't have an objection to it, but I've been pushing that we make the
change universal from the beginning of the discussion.

The issue is that it causes breakage on apps that aren't following the
interface properly. iotop, in particular, has hard-coded offsets into
the packet to fish out the taskstats structure.

So, if the goal of not breaking x86_64 is good enough, I'm fine with
this change.

- -Jeff


- -- 
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAk0U6kgACgkQLPWxlyuTD7IqxACfVpl1BIlc/5RXbL4w1uF0meQE
3XMAoJTNbInYgNE5xJ41cZ3X9Jrr4cCX
=7e96
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: taskstats alignment...
  2010-12-24 18:45 ` Jeff Mahoney
@ 2010-12-24 21:16   ` Dan Carpenter
  2010-12-25  2:18     ` Jeff Mahoney
  0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2010-12-24 21:16 UTC (permalink / raw)
  To: Jeff Mahoney; +Cc: David Miller, linux-kernel, balbir, Andrew Morton

On Fri, Dec 24, 2010 at 01:45:29PM -0500, Jeff Mahoney wrote:
v> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 12/23/2010 12:30 PM, David Miller wrote:
> > 
> > Re: commit 4be2c95d1f7706ca0e74499f2bd118e1cee19669
> > 
> > Pretty much every 64-bit architecture other than
> > powerpc64 and x86-64 needs that code, not just
> > IA64.
> > 
> > Better check would be:
> > 
> > CONFIG_64BIT && !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
> > 
> > Otherwise we'll be twiddling that ifdef endlessly as each
> > and every other 64-bit platform bumps into this issue.
> > 
> > So please could you change this to use a more sane check?
> 
> I don't have an objection to it, but I've been pushing that we make the
> change universal from the beginning of the discussion.
> 
> The issue is that it causes breakage on apps that aren't following the
> interface properly. iotop, in particular, has hard-coded offsets into
> the packet to fish out the taskstats structure.
> 
> So, if the goal of not breaking x86_64 is good enough, I'm fine with
> this change.

Didn't you say something along the lines that if they don't have
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS then there is a warning message
printed in dmesg?  I thought that was what prompted you to change the
alignment in the first place.  It sound like those arches are already
broken so David's suggestion would be a clear improvement over the 
current code.

BTW, since you're redoing the patch, it would be good if you pasted the
warning message into the changelog.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: taskstats alignment...
  2010-12-24 21:16   ` Dan Carpenter
@ 2010-12-25  2:18     ` Jeff Mahoney
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Mahoney @ 2010-12-25  2:18 UTC (permalink / raw)
  To: Dan Carpenter, David Miller, linux-kernel, balbir, Andrew Morton

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 12/24/2010 04:16 PM, Dan Carpenter wrote:
> On Fri, Dec 24, 2010 at 01:45:29PM -0500, Jeff Mahoney wrote:
> v> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 12/23/2010 12:30 PM, David Miller wrote:
>>>
>>> Re: commit 4be2c95d1f7706ca0e74499f2bd118e1cee19669
>>>
>>> Pretty much every 64-bit architecture other than
>>> powerpc64 and x86-64 needs that code, not just
>>> IA64.
>>>
>>> Better check would be:
>>>
>>> CONFIG_64BIT && !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS
>>>
>>> Otherwise we'll be twiddling that ifdef endlessly as each
>>> and every other 64-bit platform bumps into this issue.
>>>
>>> So please could you change this to use a more sane check?
>>
>> I don't have an objection to it, but I've been pushing that we make the
>> change universal from the beginning of the discussion.
>>
>> The issue is that it causes breakage on apps that aren't following the
>> interface properly. iotop, in particular, has hard-coded offsets into
>> the packet to fish out the taskstats structure.
>>
>> So, if the goal of not breaking x86_64 is good enough, I'm fine with
>> this change.
> 
> Didn't you say something along the lines that if they don't have
> CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS then there is a warning message
> printed in dmesg?  I thought that was what prompted you to change the
> alignment in the first place.  It sound like those arches are already
> broken so David's suggestion would be a clear improvement over the 
> current code.

Yes, that is the original reason for the patch. The discussion was
surrounding which arches to break, since I made it universal. Changing
it to CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS (didn't know that existed
before) makes sense.

> BTW, since you're redoing the patch, it would be good if you pasted the
> warning message into the changelog.

Ok, that's easy enough.

- -Jeff

- -- 
Jeff Mahoney
SUSE Labs
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

iEYEARECAAYFAk0VVFgACgkQLPWxlyuTD7JD2gCgi99mSqA29g5k9b9yj7od67mk
rkAAnR5Stz8fY4eYZbRJetz+fyH8D3iz
=zgux
-----END PGP SIGNATURE-----

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-25  2:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-23 17:30 taskstats alignment David Miller
2010-12-24 18:45 ` Jeff Mahoney
2010-12-24 21:16   ` Dan Carpenter
2010-12-25  2:18     ` Jeff Mahoney

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox