public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeff Mahoney <jeffm@suse.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Dan Carpenter <error27@gmail.com>,
	balbir@linux.vnet.ibm.com,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] taskstats: Use better ifdef for alignment
Date: Thu, 30 Dec 2010 00:26:34 -0500	[thread overview]
Message-ID: <4D1C180A.20000@suse.com> (raw)
In-Reply-To: <20101229161418.d34bf0d4.akpm@linux-foundation.org>

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

On 12/29/2010 07:14 PM, Andrew Morton wrote:
> On Wed, 29 Dec 2010 19:12:08 -0500 Jeff Mahoney <jeffm@suse.com> wrote:
> 
>>  Commit 4be2c95d added a null field to align the taskstats structure but
>>  the discussion centered around ia64. The issue exists on other platforms
>>  with inefficient unaligned access and adding them piecemeal would be
>>  an unmaintainable mess.
>>
>>  This patch uses Dave Miller's suggestion of using a combination of
>>  CONFIG_64BIT && !CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS to determine
>>  whether alignment is needed.
>>
>>  Note that this will cause breakage on those platforms with applications
>>  like iotop which had hard-coded offsets into the packet to access the
>>  taskstats structure.
> 
> That seems a very good reason to not apply the patch.
> 
> Tell us more, please...

I don't want to rehash the same discussion, but any argument that
applied to ia64 applies any other 64-bit arch other than powerpc and x86_64.

- -Jeff

>>  The message seen on systems without the alignment fixes looks like:
>>  kernel unaligned access to 0xe000023879dca9bc, ip=0xa000000100133d10
>>
>>  The addresses may vary but resolve to locations inside __delayacct_add_tsk.
>>
>> Reported-by: David S. Miller <davem@davemloft.net>
>> Signed-off-by: Jeff Mahoney <jeffm@suse.com>
>> ---
>>  kernel/taskstats.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> --- a/kernel/taskstats.c
>> +++ b/kernel/taskstats.c
>> @@ -349,7 +349,7 @@ static int parse(struct nlattr *na, stru
>>  	return ret;
>>  }
>>  
>> -#ifdef CONFIG_IA64
>> +#if defined(CONFIG_64BIT) && !defined(CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS)
>>  #define TASKSTATS_NEEDS_PADDING 1
>>  #endif
>>  


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

iEYEARECAAYFAk0cGAoACgkQLPWxlyuTD7IdTwCfXZ0KfZ3N/zafSzGCSa4cHEbN
EU8AoI/JK/1nkv5xHw4XP79wZAGo4hqk
=jAGp
-----END PGP SIGNATURE-----

  reply	other threads:[~2010-12-30  5:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-30  0:12 [PATCH] taskstats: Use better ifdef for alignment Jeff Mahoney
2010-12-30  0:14 ` Andrew Morton
2010-12-30  5:26   ` Jeff Mahoney [this message]
2010-12-30  5:32     ` Andrew Morton
2010-12-30 15:52       ` Jeff Mahoney
2011-01-01 16:19         ` Florian Mickler
2011-01-01 16:51           ` Dan Carpenter
2011-01-02 12:17             ` Florian Mickler
2011-01-08 22:42               ` Florian Mickler
2011-01-08 22:46               ` Jeff Mahoney
2010-12-31  0:23 ` 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=4D1C180A.20000@suse.com \
    --to=jeffm@suse.com \
    --cc=akpm@linux-foundation.org \
    --cc=balbir@linux.vnet.ibm.com \
    --cc=davem@davemloft.net \
    --cc=error27@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    /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