From: Matthew Wilcox <willy@debian.org>
To: Andi Kleen <ak@muc.de>
Cc: Matthew Wilcox <willy@debian.org>,
"David S. Miller" <davem@redhat.com>,
akpm@digeo.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 16:11:12 +0100 [thread overview]
Message-ID: <20030416151112.GB1505@parcelfarce.linux.theplanet.co.uk> (raw)
In-Reply-To: <20030416150427.GA2496@averell>
On Wed, Apr 16, 2003 at 05:04:27PM +0200, Andi Kleen wrote:
> On Wed, Apr 16, 2003 at 04:55:32PM +0200, Matthew Wilcox wrote:
> > On Wed, Apr 16, 2003 at 04:43:12PM +0200, Andi Kleen wrote:
> > > On sparc64. But is that true too for all other 64bit architectures supported?
> > >
> > > e.g. How about PA-RISC? (always seems to do things differently)
> >
> > As you know our only two atomic ops are load-and-clear 32-bit quantity and
> > load-and-clear 64-bit quantity. so we take one of the hashed spinlocks ..
>
> Sure, but you use a 64bit read/store in set_bit/clear_bit etc., right?
err.. so what? Once we've got the spinlock, other writers are blocked
and readers can either see the state before or the state after (stores
are atomic on PA)
> If yes then you can't use this unless you rewrite them to use 32bit store
> - otherwise it will conflict with the atomic_t counter in the 64bit slot
> which is not protected.
> I think my current patch is fine for you - you can still optimize it
> this way, but it should already work. Jakub's version would break though.
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).
--
"It's not Hollywood. War is real, war is primarily not about defeat or
victory, it is about death. I've seen thousands and thousands of dead bodies.
Do you think I want to have an academic debate on this subject?" -- Robert Fisk
next prev parent reply other threads:[~2003-04-16 14:59 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 [this message]
2003-04-16 20:35 ` Andrew Morton
2003-04-16 21:26 ` Matthew Wilcox
2003-04-16 21:43 ` Andrew Morton
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=20030416151112.GB1505@parcelfarce.linux.theplanet.co.uk \
--to=willy@debian.org \
--cc=ak@muc.de \
--cc=akpm@digeo.com \
--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 \
/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®