All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <andi@firstfloor.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Meelis Roos <mroos@linux.ee>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	sparclinux@vger.kernel.org
Subject: Re: reorganized struct inode results in unaligned accesses
Date: Sun, 19 Jun 2011 22:35:30 +0000	[thread overview]
Message-ID: <m2boxtfo0d.fsf@firstfloor.org> (raw)
In-Reply-To: <BANLkTiktb6GS7fcHRRgC=bHJjz8k0hVmPw@mail.gmail.com> (Linus Torvalds's message of "Sun, 19 Jun 2011 09:51:24 -0700")

Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> Dang. I guess it needs to be made "unsigned long" again. Which is a
> shame, because we only use a couple of bits from there, and "struct
> inode" really is much too big already.

In the past it was usually enough to just align it to alignof(unsigned
long), not actually make it long. struct page went through this
a long time ago.

This could cause r-m-w races with the next field in theory, but assuming
it's reasonably read-only (ie only set up at inode creation time)
that should be fine.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

WARNING: multiple messages have this Message-ID (diff)
From: Andi Kleen <andi@firstfloor.org>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Meelis Roos <mroos@linux.ee>,
	Linux Kernel list <linux-kernel@vger.kernel.org>,
	sparclinux@vger.kernel.org
Subject: Re: reorganized struct inode results in unaligned accesses
Date: Sun, 19 Jun 2011 15:35:30 -0700	[thread overview]
Message-ID: <m2boxtfo0d.fsf@firstfloor.org> (raw)
In-Reply-To: <BANLkTiktb6GS7fcHRRgC=bHJjz8k0hVmPw@mail.gmail.com> (Linus Torvalds's message of "Sun, 19 Jun 2011 09:51:24 -0700")

Linus Torvalds <torvalds@linux-foundation.org> writes:
>
> Dang. I guess it needs to be made "unsigned long" again. Which is a
> shame, because we only use a couple of bits from there, and "struct
> inode" really is much too big already.

In the past it was usually enough to just align it to alignof(unsigned
long), not actually make it long. struct page went through this
a long time ago.

This could cause r-m-w races with the next field in theory, but assuming
it's reasonably read-only (ie only set up at inode creation time)
that should be fine.

-Andi

-- 
ak@linux.intel.com -- Speaking for myself only

  reply	other threads:[~2011-06-19 22:35 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-19 16:33 reorganized struct inode results in unaligned accesses Meelis Roos
2011-06-19 16:33 ` Meelis Roos
2011-06-19 16:51 ` Linus Torvalds
2011-06-19 16:51   ` Linus Torvalds
2011-06-19 22:35   ` Andi Kleen [this message]
2011-06-19 22:35     ` Andi Kleen
2011-06-19 23:01     ` David Miller
2011-06-19 23:01       ` David Miller
2011-06-19 23:14       ` Andi Kleen
2011-06-19 23:14         ` Andi Kleen

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=m2boxtfo0d.fsf@firstfloor.org \
    --to=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mroos@linux.ee \
    --cc=sparclinux@vger.kernel.org \
    --cc=torvalds@linux-foundation.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 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.