* [RESEND PATCH] Documentation: statistics about nested locks
@ 2011-05-19 10:53 Juri Lelli
2011-05-19 11:46 ` Peter Zijlstra
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Juri Lelli @ 2011-05-19 10:53 UTC (permalink / raw)
To: linux-kernel; +Cc: Peter Zijlstra, Ingo Molnar, Yong Zhang, trivial
Explain what the trailing "/1" on some lock class names of lock_stat output
means.
Cc: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
---
Documentation/lockstat.txt | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
index 65f4c79..75eeb65 100644
--- a/Documentation/lockstat.txt
+++ b/Documentation/lockstat.txt
@@ -12,8 +12,9 @@ Because things like lock contention can severely impact performance.
- HOW
Lockdep already has hooks in the lock functions and maps lock instances to
-lock classes. We build on that. The graph below shows the relation between
-the lock functions and the various hooks therein.
+lock classes. We build on that (see Documentation/lockdep-design.txt).
+The graph below shows the relation between the lock functions and the various
+hooks therein.
__acquire
|
@@ -128,6 +129,37 @@ points are the points we're contending with.
The integer part of the time values is in us.
+Dealing with nested locks, subclasses may appear:
+
+32...............................................................................................................................................................................................
+33
+34 &rq->lock: 13128 13128 0.43 190.53 103881.26 97454 3453404 0.00 401.11 13224683.11
+35 ---------
+36 &rq->lock 645 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
+37 &rq->lock 297 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
+38 &rq->lock 360 [<ffffffff8103c4c5>] select_task_rq_fair+0x1f0/0x74a
+39 &rq->lock 428 [<ffffffff81045f98>] scheduler_tick+0x46/0x1fb
+40 ---------
+41 &rq->lock 77 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
+42 &rq->lock 174 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
+43 &rq->lock 4715 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
+44 &rq->lock 893 [<ffffffff81340524>] schedule+0x157/0x7b8
+45
+46...............................................................................................................................................................................................
+47
+48 &rq->lock/1: 11526 11488 0.33 388.73 136294.31 21461 38404 0.00 37.93 109388.53
+49 -----------
+50 &rq->lock/1 11526 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
+51 -----------
+52 &rq->lock/1 5645 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
+53 &rq->lock/1 1224 [<ffffffff81340524>] schedule+0x157/0x7b8
+54 &rq->lock/1 4336 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
+55 &rq->lock/1 181 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
+
+Line 48 shows statistics for the second subclass (/1) of &rq->lock class
+(subclass starts from 0), since in this case, as line 50 suggests,
+double_rq_lock actually acquires a nested lock of two spinlocks.
+
View the top contending locks:
# grep : /proc/lock_stat | head
--
1.7.4.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH] Documentation: statistics about nested locks
2011-05-19 10:53 [RESEND PATCH] Documentation: statistics about nested locks Juri Lelli
@ 2011-05-19 11:46 ` Peter Zijlstra
2011-05-20 1:20 ` Yong Zhang
2011-05-28 16:36 ` [tip:core/urgent] Documentation: Add " tip-bot for Juri Lelli
2 siblings, 0 replies; 4+ messages in thread
From: Peter Zijlstra @ 2011-05-19 11:46 UTC (permalink / raw)
To: Juri Lelli; +Cc: linux-kernel, Ingo Molnar, Yong Zhang, trivial
On Thu, 2011-05-19 at 12:53 +0200, Juri Lelli wrote:
> Explain what the trailing "/1" on some lock class names of lock_stat output
> means.
great, this applies without problems, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [RESEND PATCH] Documentation: statistics about nested locks
2011-05-19 10:53 [RESEND PATCH] Documentation: statistics about nested locks Juri Lelli
2011-05-19 11:46 ` Peter Zijlstra
@ 2011-05-20 1:20 ` Yong Zhang
2011-05-28 16:36 ` [tip:core/urgent] Documentation: Add " tip-bot for Juri Lelli
2 siblings, 0 replies; 4+ messages in thread
From: Yong Zhang @ 2011-05-20 1:20 UTC (permalink / raw)
To: Juri Lelli; +Cc: linux-kernel, Peter Zijlstra, Ingo Molnar, trivial
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 4841 bytes --]
On Thu, May 19, 2011 at 6:53 PM, Juri Lelli <juri.lelli@gmail.com> wrote:
> Explain what the trailing "/1" on some lock class names of lock_stat output
> means.
>
> Cc: Yong Zhang <yong.zhang0@gmail.com>
> Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
>
Looks good.
Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
> ---
> Â Documentation/lockstat.txt | Â 36 ++++++++++++++++++++++++++++++++++--
> Â 1 files changed, 34 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
> index 65f4c79..75eeb65 100644
> --- a/Documentation/lockstat.txt
> +++ b/Documentation/lockstat.txt
> @@ -12,8 +12,9 @@ Because things like lock contention can severely impact performance.
> Â - HOW
>
> Â Lockdep already has hooks in the lock functions and maps lock instances to
> -lock classes. We build on that. The graph below shows the relation between
> -the lock functions and the various hooks therein.
> +lock classes. We build on that (see Documentation/lockdep-design.txt).
> +The graph below shows the relation between the lock functions and the various
> +hooks therein.
>
> Â Â Â Â __acquire
> Â Â Â Â Â Â |
> @@ -128,6 +129,37 @@ points are the points we're contending with.
>
> Â The integer part of the time values is in us.
>
> +Dealing with nested locks, subclasses may appear:
> +
> +32...............................................................................................................................................................................................
> +33
> +34 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â &rq->lock: Â Â Â Â 13128 Â Â Â Â Â 13128 Â Â Â Â Â 0.43 Â Â Â Â 190.53 Â Â Â 103881.26 Â Â Â Â Â 97454 Â Â Â Â 3453404 Â Â Â Â Â 0.00 Â Â Â Â 401.11 Â Â 13224683.11
> +35 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ---------
> +36                &rq->lock       645      [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
> +37                &rq->lock       297      [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
> +38                &rq->lock       360      [<ffffffff8103c4c5>] select_task_rq_fair+0x1f0/0x74a
> +39                &rq->lock       428      [<ffffffff81045f98>] scheduler_tick+0x46/0x1fb
> +40 Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â ---------
> +41                &rq->lock       77      [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
> +42                &rq->lock       174      [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
> +43                &rq->lock      4715      [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
> +44                &rq->lock       893      [<ffffffff81340524>] schedule+0x157/0x7b8
> +45
> +46...............................................................................................................................................................................................
> +47
> +48 Â Â Â Â Â Â Â Â Â Â Â Â Â Â &rq->lock/1: Â Â Â Â 11526 Â Â Â Â Â 11488 Â Â Â Â Â 0.33 Â Â Â Â 388.73 Â Â Â 136294.31 Â Â Â Â Â 21461 Â Â Â Â Â 38404 Â Â Â Â Â 0.00 Â Â Â Â Â 37.93 Â Â Â 109388.53
> +49 Â Â Â Â Â Â Â Â Â Â Â Â Â Â -----------
> +50 Â Â Â Â Â Â Â Â Â Â Â Â Â Â &rq->lock/1 Â Â Â Â Â 11526 Â Â Â Â Â [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
> +51 Â Â Â Â Â Â Â Â Â Â Â Â Â Â -----------
> +52 Â Â Â Â Â Â Â Â Â Â Â Â Â Â &rq->lock/1 Â Â Â Â Â 5645 Â Â Â Â Â [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
> +53 Â Â Â Â Â Â Â Â Â Â Â Â Â Â &rq->lock/1 Â Â Â Â Â 1224 Â Â Â Â Â [<ffffffff81340524>] schedule+0x157/0x7b8
> +54 Â Â Â Â Â Â Â Â Â Â Â Â Â Â &rq->lock/1 Â Â Â Â Â 4336 Â Â Â Â Â [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
> +55 Â Â Â Â Â Â Â Â Â Â Â Â Â Â &rq->lock/1 Â Â Â Â Â Â 181 Â Â Â Â Â [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
> +
> +Line 48 shows statistics for the second subclass (/1) of &rq->lock class
> +(subclass starts from 0), since in this case, as line 50 suggests,
> +double_rq_lock actually acquires a nested lock of two spinlocks.
> +
> Â View the top contending locks:
>
> Â # grep : /proc/lock_stat | head
> --
> 1.7.4.1
>
--
Only stand for myself
ÿôèº{.nÇ+·®+%Ëÿ±éݶ\x17¥wÿº{.nÇ+·¥{±þG«éÿ{ayº\x1dÊÚë,j\a¢f£¢·hïêÿêçz_è®\x03(éÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?¨èÚ&£ø§~á¶iOæ¬z·vØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?I¥
^ permalink raw reply [flat|nested] 4+ messages in thread
* [tip:core/urgent] Documentation: Add statistics about nested locks
2011-05-19 10:53 [RESEND PATCH] Documentation: statistics about nested locks Juri Lelli
2011-05-19 11:46 ` Peter Zijlstra
2011-05-20 1:20 ` Yong Zhang
@ 2011-05-28 16:36 ` tip-bot for Juri Lelli
2 siblings, 0 replies; 4+ messages in thread
From: tip-bot for Juri Lelli @ 2011-05-28 16:36 UTC (permalink / raw)
To: linux-tip-commits
Cc: linux-kernel, hpa, mingo, a.p.zijlstra, tglx, yong.zhang0,
juri.lelli, mingo
Commit-ID: f62508f68d04adefc4cf9b0177ba02c8818b3eec
Gitweb: http://git.kernel.org/tip/f62508f68d04adefc4cf9b0177ba02c8818b3eec
Author: Juri Lelli <juri.lelli@gmail.com>
AuthorDate: Thu, 19 May 2011 12:53:53 +0200
Committer: Ingo Molnar <mingo@elte.hu>
CommitDate: Sat, 28 May 2011 17:03:29 +0200
Documentation: Add statistics about nested locks
Explain what the trailing "/1" on some lock class names of
lock_stat output means.
Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
Signed-off-by: Juri Lelli <juri.lelli@gmail.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/4DD4F6C1.5090701@gmail.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
Documentation/lockstat.txt | 36 ++++++++++++++++++++++++++++++++++--
1 files changed, 34 insertions(+), 2 deletions(-)
diff --git a/Documentation/lockstat.txt b/Documentation/lockstat.txt
index 9c0a80d..cef00d4 100644
--- a/Documentation/lockstat.txt
+++ b/Documentation/lockstat.txt
@@ -12,8 +12,9 @@ Because things like lock contention can severely impact performance.
- HOW
Lockdep already has hooks in the lock functions and maps lock instances to
-lock classes. We build on that. The graph below shows the relation between
-the lock functions and the various hooks therein.
+lock classes. We build on that (see Documentation/lockdep-design.txt).
+The graph below shows the relation between the lock functions and the various
+hooks therein.
__acquire
|
@@ -128,6 +129,37 @@ points are the points we're contending with.
The integer part of the time values is in us.
+Dealing with nested locks, subclasses may appear:
+
+32...............................................................................................................................................................................................
+33
+34 &rq->lock: 13128 13128 0.43 190.53 103881.26 97454 3453404 0.00 401.11 13224683.11
+35 ---------
+36 &rq->lock 645 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
+37 &rq->lock 297 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
+38 &rq->lock 360 [<ffffffff8103c4c5>] select_task_rq_fair+0x1f0/0x74a
+39 &rq->lock 428 [<ffffffff81045f98>] scheduler_tick+0x46/0x1fb
+40 ---------
+41 &rq->lock 77 [<ffffffff8103bfc4>] task_rq_lock+0x43/0x75
+42 &rq->lock 174 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
+43 &rq->lock 4715 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
+44 &rq->lock 893 [<ffffffff81340524>] schedule+0x157/0x7b8
+45
+46...............................................................................................................................................................................................
+47
+48 &rq->lock/1: 11526 11488 0.33 388.73 136294.31 21461 38404 0.00 37.93 109388.53
+49 -----------
+50 &rq->lock/1 11526 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
+51 -----------
+52 &rq->lock/1 5645 [<ffffffff8103ed4b>] double_rq_lock+0x42/0x54
+53 &rq->lock/1 1224 [<ffffffff81340524>] schedule+0x157/0x7b8
+54 &rq->lock/1 4336 [<ffffffff8103ed58>] double_rq_lock+0x4f/0x54
+55 &rq->lock/1 181 [<ffffffff8104ba65>] try_to_wake_up+0x127/0x25a
+
+Line 48 shows statistics for the second subclass (/1) of &rq->lock class
+(subclass starts from 0), since in this case, as line 50 suggests,
+double_rq_lock actually acquires a nested lock of two spinlocks.
+
View the top contending locks:
# grep : /proc/lock_stat | head
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-05-28 16:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-05-19 10:53 [RESEND PATCH] Documentation: statistics about nested locks Juri Lelli
2011-05-19 11:46 ` Peter Zijlstra
2011-05-20 1:20 ` Yong Zhang
2011-05-28 16:36 ` [tip:core/urgent] Documentation: Add " tip-bot for Juri Lelli
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.