public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: Keith Owens <kaos@ocs.com.au>
Cc: Linus Torvalds <torvalds@osdl.org>, Pavel Machek <pavel@ucw.cz>,
	Zwane Mwaikambo <zwane@linuxpower.ca>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@osdl.org>, Matt Mackall <mpm@selenic.com>
Subject: Re: [PATCH][2.6] Completely out of line spinlocks / i386
Date: Wed, 11 Aug 2004 18:01:15 -0700	[thread overview]
Message-ID: <20040812010115.GY11200@holomorphy.com> (raw)
In-Reply-To: <23701.1092268910@ocs3.ocs.com.au>

On Wed, 11 Aug 2004 15:13:15 -0700 (PDT), Linus Torvalds wrote:
>> The inline spinlocks are _wonderful_ for seeing where the contention is in 
>> a simple profile.
>> In contrast, in a profile the out-of-lines ones will show "x% was spent on 
>> spinlocks". Which doesn't help much when you want to see where the problem 
>> is.
>> This was _hugely_ useful, at least for me, for seeing what locks were 
>> problematic.

On Thu, Aug 12, 2004 at 10:01:50AM +1000, Keith Owens wrote:
> Tweak the profile code to detect that the instruction pointer is in the
> out of line spinlock code and replace the ip with the caller's ip.  We
> already do that for ia64, where the out of line spinlock code is a big
> win.  A kdb backtrace on an ia64 contended lock will even decode the
> address of the lock, which is only possible because the lock address is
> in a known location for this case.

This would be a useful extension for other architectures also, if/when
they convert to doing likewise.

I actually favored making C language spin_lock() (i.e. the goddamn
thing is declared as a C function void spin_lock(spinlock_t *) and is
called like a normal C function -- no inline asm or inline C functions
at all) entrypoints beyond merely conslidating contention loops, but I
feared that would be too extreme of a reversal of the status quo to
ever get traction to post it. It did, however, shrink the kernel text
the most of any of the out-of-line spinlock patches by a large margin,
something completely absurd-sounding, like 220KB vs. 20KB-60KB. =)


-- wli

  parent reply	other threads:[~2004-08-12  1:06 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-08  4:49 [PATCH][2.6] Completely out of line spinlocks / i386 Zwane Mwaikambo
2004-08-08  5:01 ` Linus Torvalds
2004-08-08  5:17   ` Zwane Mwaikambo
2004-08-08  5:21     ` Linus Torvalds
2004-08-08  6:00       ` Zwane Mwaikambo
2004-08-08 12:33         ` Andreas Schwab
2004-08-08 18:26           ` Zwane Mwaikambo
2004-08-11 21:59 ` Pavel Machek
2004-08-11 22:13   ` Linus Torvalds
2004-08-11 22:23     ` William Lee Irwin III
2004-08-12  0:01     ` Keith Owens
2004-08-12  0:39       ` David S. Miller
2004-08-12  0:54       ` Zwane Mwaikambo
2004-08-12  1:01       ` William Lee Irwin III [this message]
2004-08-12  1:37         ` Zwane Mwaikambo
2004-08-12  2:04           ` William Lee Irwin III
2004-08-12  7:20             ` William Lee Irwin III
2004-08-12  7:23               ` William Lee Irwin III
2004-08-12  7:25                 ` William Lee Irwin III
2004-08-12  8:12               ` Zwane Mwaikambo
2004-08-12  8:11                 ` William Lee Irwin III
2004-08-12  8:54                   ` William Lee Irwin III
2004-08-13  8:01               ` William Lee Irwin III
2004-08-13  9:16                 ` William Lee Irwin III
2004-08-13  9:30                   ` William Lee Irwin III
2004-08-13  9:46                     ` William Lee Irwin III
2004-08-13 10:05                       ` William Lee Irwin III
2004-08-13 10:23                         ` William Lee Irwin III
2004-08-13 10:39                           ` William Lee Irwin III
2004-08-13 14:15                             ` Zwane Mwaikambo
2004-08-13 14:29                               ` William Lee Irwin III

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=20040812010115.GY11200@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=kaos@ocs.com.au \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpm@selenic.com \
    --cc=pavel@ucw.cz \
    --cc=torvalds@osdl.org \
    --cc=zwane@linuxpower.ca \
    /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