mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@digeo.com>
To: Matthew Wilcox <willy@debian.org>
Cc: willy@debian.org, ak@muc.de, davem@redhat.com,
	linux-kernel@vger.kernel.org, anton@samba.org,
	schwidefsky@de.ibm.com, davidm@hpl.hp.com, matthew@wil.cx,
	ralf@linux-mips.org, rth@redhat.com
Subject: Re: Reduce struct page by 8 bytes on 64bit
Date: Wed, 16 Apr 2003 14:43:11 -0700	[thread overview]
Message-ID: <20030416144311.46f32253.akpm@digeo.com> (raw)
In-Reply-To: <20030416212651.GF1505@parcelfarce.linux.theplanet.co.uk>

Matthew Wilcox <willy@debian.org> wrote:
>
> On Wed, Apr 16, 2003 at 01:35:39PM -0700, Andrew Morton wrote:
> > Matthew Wilcox <willy@debian.org> wrote:
> > >
> > > Jacob's would break if we hashed to different spinlocks.  But we don't, we
> > > shift right by 8, so we get the same spinlock for atomic things that are on
> > > the same "cacheline" (i think PA cachelines are actually 64 or 128 bytes,
> > > depending on model).
> > > 
> > 
> > Are you prepared to cast this in stone?
> 
> I think so.  It makes sense to me that we lock an entire cacheline for
> this kind of thing.  Indeed, locking a smaller amount would probably break
> other stuff.  Remember set_bit() et al take a pointer to an unsigned long...
> but can take a bit number > number of bits in an unsigned long.  If anything,
> we should maybe expand the range covered by a single lock to a larger amount
> than 256 bytes.

Well are we sure that the `flags' and `count' fields will always fall into
the same 256-byte range?  Wouldn't it subtly break if sizeof(struct page)
became not a multiple of eight?  Will the compiler pad it out anyway?

> How big are ext2 bitmaps, for example?

They can be 8k, rarely.  Usually 4k.  But ext2_set_bit() and friends are
nonatomic - the filesystem does the locking.

We just added the new ext2_set/clear_bit_atomic() functions which _are_
supposed to be atomic.  The architecture is passed a spinlock which it can
use for that, but only big-endian architectures are likely to need it.



  reply	other threads:[~2003-04-16 21:32 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-04-15 11:24 Andi Kleen
2003-04-16 12:45 ` David S. Miller
2003-04-16 13:22   ` Jakub Jelinek
2003-04-16 14:07   ` Andi Kleen
2003-04-16 14:26     ` David S. Miller
2003-04-16 14:43       ` Andi Kleen
2003-04-16 14:38         ` David S. Miller
2003-04-16 14:58           ` Andi Kleen
2003-04-16 14:58             ` David S. Miller
2003-04-16 14:55         ` Matthew Wilcox
2003-04-16 15:04           ` Andi Kleen
2003-04-16 15:00             ` David S. Miller
2003-04-16 15:11             ` Matthew Wilcox
2003-04-16 20:35               ` Andrew Morton
2003-04-16 21:26                 ` Matthew Wilcox
2003-04-16 21:43                   ` Andrew Morton [this message]
2003-04-16 21:40                     ` David S. Miller
2003-04-17 15:20                       ` 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=20030416144311.46f32253.akpm@digeo.com \
    --to=akpm@digeo.com \
    --cc=ak@muc.de \
    --cc=anton@samba.org \
    --cc=davem@redhat.com \
    --cc=davidm@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=ralf@linux-mips.org \
    --cc=rth@redhat.com \
    --cc=schwidefsky@de.ibm.com \
    --cc=willy@debian.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

all inboxes | Powered by JetHome®