public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@zip.com.au>
To: Andrea Arcangeli <andrea@suse.de>
Cc: Mark Hemment <markhe@veritas.com>,
	Juergen Doelle <JDOELLE@de.ibm.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Align VM locks
Date: Thu, 16 Aug 2001 12:14:23 -0700	[thread overview]
Message-ID: <3B7C1B8F.708CBB9@zip.com.au> (raw)
In-Reply-To: <Pine.LNX.4.33.0108161839180.3340-100000@alloc.wat.veritas.com>, <Pine.LNX.4.33.0108161839180.3340-100000@alloc.wat.veritas.com>; from markhe@veritas.com on Thu, Aug 16, 2001 at 06:41:08PM +0100 <20010816202606.B8726@athlon.random>

Andrea Arcangeli wrote:
> 
> On Thu, Aug 16, 2001 at 06:41:08PM +0100, Mark Hemment wrote:
> > Hi,
> >
> >   The patch below ensures the pagecache_lock and pagemap_lru_lock aren't
> > sharing an L1 cacheline with anyone else - espically each other!
> 
> This is the right one:
> 
>         ftp://ftp.us.kernel.org/pub/linux/kernel/people/andrea/kernels/v2.4/2.4.8aa1/00_cachelinealigned-in-smp-1
> 

Problem with this approach is that it doesn't prevent the linker
from placing other data in the same cacheline as the aligned
lock, at higher addresses.

The work which Juergen Doelle did recently addresses this - just
special-case the five hot spinlocks with additional padding at
the end.

http://www.geocrawler.com/archives/3/5312/2001/7/0/6271339/

With the toolchain I'm using, with latest -ac kernels,
we happened to get lucky:

00000000c03053c0 D pagecache_lock
00000000c03053e0 D pagemap_lru_lock
00000000c03053e4 d file_shared_mmap
00000000c03053f0 d file_private_mmap

The linker decided to not put anything in pagecache_lock's line,
and vm_operations_struct is read-only....

Juergen demonstrated a 17% speedup of RAM-only dbench on an 8-way with
his patch.

And we perhaps should do something about these:

00000000c0305e64 d hash_table_lock
00000000c0305e68 d lru_list_lock
00000000c0305e6c d unused_list_lock

All in the same cacheline.  These tend to be taken back-to-back,
so splitting these apart may be less effective.  Be interesting
to measure these independently.

Juergen, I'd suggest you dust off that patch, add the conditionals
which make it a no-op on uniprocessor and submit it.  It's such a
simple, easy way to gain significant performance improvement - it's
worth doing.

-

  parent reply	other threads:[~2001-08-16 19:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-08-16 17:41 [PATCH] Align VM locks Mark Hemment
2001-08-16 18:26 ` Andrea Arcangeli
2001-08-16 18:44   ` Mark Hemment
2001-08-16 18:52     ` Andrea Arcangeli
2001-08-16 18:57       ` Andrea Arcangeli
2001-08-16 19:46       ` Mark Hemment
2001-08-16 20:27         ` Ben LaHaise
2001-08-16 23:35           ` Andrea Arcangeli
2001-08-16 19:14   ` Andrew Morton [this message]
2001-08-16 23:33     ` Andrea Arcangeli

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=3B7C1B8F.708CBB9@zip.com.au \
    --to=akpm@zip.com.au \
    --cc=JDOELLE@de.ibm.com \
    --cc=andrea@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markhe@veritas.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