From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Steven Rostedt <rostedt@goodmis.org>,
Peter Williams <pwil3058@bigpond.net.au>,
Thomas Gleixner <tglx@linutronix.de>,
Andrew Morton <akpm@osdl.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] Avoid moving tasks when a schedule can be made.
Date: Mon, 06 Feb 2006 22:21:59 +1100 [thread overview]
Message-ID: <43E73157.50300@yahoo.com.au> (raw)
In-Reply-To: <20060201172413.GA22596@elte.hu>
Ingo Molnar wrote:
> * Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
>
>>>>But there are still places where interrupts can be held off for
>>>>indefinite periods. I don't see why the scheduler lock is suddenly
>>>>important [...]
>>>
>>>
>>>the scheduler lock is obviously important because it's the most central
>>>lock in existence.
>>>
>>
>>Now I call that argument much more illogical than any of mine. How can
>>such a fine grained, essentially per-cpu lock be "central", let alone
>>"most central"? [...]
>
>
> i meant central in the sense that it's the most frequently taken lock,
> in the majority of workloads. Here's the output from the lock validator,
> sorted by number of ops per lock:
>
> -> (dcache_lock){--} 124233 {
> -> (&rt_hash_locks[i]){-+} 131085 {
> -> (&dentry->d_lock){--} 312431 {
> -> (cpa_lock){++} 507385 {
> -> (__pte_lockptr(new)){--} 660193 {
> -> (kernel/synchro-test.c:&mutex){--} 825023 {
> -> (&rwsem){--} 930501 {
> -> (&rq->lock){++} 2029146 {
>
> the runqueue lock is also central in the sense that it is the most
> spread-out lock in the locking dependencies graph. Toplist of locks, by
> number of backwards dependencies:
>
> 15 -> &cwq->lock
> 15 -> nl_table_wait
> 15 -> &zone->lock
> 17 -> &base->t_base.lock
> 32 -> modlist_lock
> 38 -> &cachep->spinlock
> 46 -> &parent->list_lock
> 47 -> &rq->lock
>
> (obviously, as no other lock must nest inside the runqueue lock.)
>
> so the quality of code (including asymptotic behavior) that runs under
> the runqueue lock is of central importance. I didnt think i'd ever have
> to explain this to you, but it is my pleasure to do so ;-) Maybe you
> thought of something else under "central"?
>
That's all very interesting, but is purely based on some statistical
analysis of some workload of your choice, and ignores other possible
measures like contention or average/max hold times.
One could concoct a workload for which some other lock is the "*most*
central", strangely enough.
Anyway I'm not trying to say that the runqueue locks are not important,
nor that large latencies should not be avoided in the mainline kernel..
But we've known about this theoretical latency for years, ditto for
rwsem latency (which can also be a central lock in some workloads). I
was simply surprised that you just now jump into action when you see
an equally theoretical workload show you what you already know.
Enough talk from me. I'm looking at a couple of ideas which might help
to improve this too.
--
SUSE Labs, Novell Inc.
Send instant messages to your online friends http://au.messenger.yahoo.com
next prev parent reply other threads:[~2006-02-06 11:22 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-31 19:43 [PATCH] Avoid moving tasks when a schedule can be made Steven Rostedt
2006-02-01 3:36 ` Peter Williams
2006-02-01 12:44 ` Steven Rostedt
2006-02-01 13:06 ` Nick Piggin
2006-02-01 13:10 ` Nick Piggin
2006-02-01 13:20 ` Ingo Molnar
2006-02-01 13:47 ` Nick Piggin
2006-02-01 13:54 ` Nick Piggin
2006-02-01 14:12 ` Ingo Molnar
2006-02-01 14:25 ` Nick Piggin
2006-02-01 14:37 ` Ingo Molnar
2006-02-01 14:54 ` Nick Piggin
2006-02-01 15:11 ` Ingo Molnar
2006-02-01 15:31 ` Nick Piggin
2006-02-01 16:10 ` Ingo Molnar
2006-02-01 16:25 ` Nick Piggin
2006-02-01 17:24 ` Ingo Molnar
2006-02-06 11:21 ` Nick Piggin [this message]
2006-02-01 14:00 ` Ingo Molnar
2006-02-01 14:09 ` Nick Piggin
2006-02-01 14:22 ` Ingo Molnar
2006-02-01 14:32 ` Steven Rostedt
2006-02-02 1:26 ` Peter Williams
2006-02-02 2:48 ` Steven Rostedt
2006-02-02 3:19 ` Peter Williams
2006-02-01 13:08 ` Ingo Molnar
2006-02-01 13:11 ` Ingo Molnar
2006-02-02 1:42 ` Peter Williams
2006-02-02 2:51 ` Steven Rostedt
2006-02-01 13:15 ` Steven Rostedt
2006-02-01 13:23 ` Steven Rostedt
2006-02-01 13:26 ` Ingo Molnar
2006-02-01 16:11 ` Steven Rostedt
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=43E73157.50300@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pwil3058@bigpond.net.au \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
/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