Re: [PATCH] Avoid moving tasks when a schedule can be made.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



* Nick Piggin <[email protected]> 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"?

	Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux