All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <ak@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [patch] generic rwsems
Date: Fri, 13 Apr 2007 12:44:50 +0100	[thread overview]
Message-ID: <25428.1176464690@redhat.com> (raw)
In-Reply-To: <20070413102518.GD31487@wotan.suse.de>

Nick Piggin <npiggin@suse.de> wrote:

> I think I should put wait_lock after wait_list, so as to get a better
> packing on most 64-bit architectures.

It makes no difference.  struct lockdep_map contains at least one pointer and
so is going to be 8-byte aligned (assuming it's there at all).  struct
rw_semaphore contains at least one pointer/long, so it will be padded out to
8-byte size.

If you want to make a difference, you'd need to add __attribute__((packed))
but you would need to be very careful with that.

David

WARNING: multiple messages have this Message-ID (diff)
From: David Howells <dhowells@redhat.com>
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <ak@suse.de>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Memory Management List <linux-mm@kvack.org>,
	Linus Torvalds <torvalds@linux-foundation.org>
Subject: Re: [patch] generic rwsems
Date: Fri, 13 Apr 2007 12:44:50 +0100	[thread overview]
Message-ID: <25428.1176464690@redhat.com> (raw)
In-Reply-To: <20070413102518.GD31487@wotan.suse.de>

Nick Piggin <npiggin@suse.de> wrote:

> I think I should put wait_lock after wait_list, so as to get a better
> packing on most 64-bit architectures.

It makes no difference.  struct lockdep_map contains at least one pointer and
so is going to be 8-byte aligned (assuming it's there at all).  struct
rw_semaphore contains at least one pointer/long, so it will be padded out to
8-byte size.

If you want to make a difference, you'd need to add __attribute__((packed))
but you would need to be very careful with that.

David

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-04-13 11:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-13 10:04 [patch] generic rwsems Nick Piggin
2007-04-13 10:04 ` Nick Piggin
2007-04-13 10:19 ` fastcalls, was " Christoph Hellwig
2007-04-13 10:59   ` Nick Piggin
2007-04-13 10:25 ` Nick Piggin
2007-04-13 10:25   ` Nick Piggin
2007-04-13 11:44   ` David Howells [this message]
2007-04-13 11:44     ` David Howells
2007-04-13 12:13     ` Christoph Hellwig
2007-04-13 12:13       ` Christoph Hellwig
2007-04-13 10:53 ` Andi Kleen
2007-04-13 10:53   ` Andi Kleen
2007-04-13 11:20   ` Nick Piggin
2007-04-13 11:20     ` Nick Piggin
2007-04-13 12:09 ` David Howells
2007-04-13 12:09   ` David Howells
2007-04-13 12:43   ` Nick Piggin
2007-04-13 12:43     ` Nick Piggin
2007-04-13 13:22     ` William Lee Irwin III
2007-04-13 13:22       ` William Lee Irwin III
2007-04-13 13:31     ` David Howells
2007-04-13 13:31       ` David Howells
2007-04-13 14:03       ` Nick Piggin
2007-04-13 14:03         ` Nick Piggin
2007-04-13 14:29       ` Eric Dumazet
2007-04-13 14:29         ` Eric Dumazet
2007-04-13 14:49         ` David Howells
2007-04-13 14:49           ` David Howells

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=25428.1176464690@redhat.com \
    --to=dhowells@redhat.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=npiggin@suse.de \
    --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.