<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-toradex.git/kernel/sched_debug.c, branch tegra-9.12.7</title>
<subtitle>Linux kernel for Apalis and Colibri modules</subtitle>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/'/>
<entry>
<title>sched: partly revert "sched debug: remove NULL checking in print_cfs_rt_rq()"</title>
<updated>2009-01-11T01:40:32+00:00</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2009-01-10T07:43:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=805194c35b91999b139e4d6b6145f4f84fd4c814'/>
<id>805194c35b91999b139e4d6b6145f4f84fd4c814</id>
<content type='text'>
Impact: avoid accessing NULL tg.css-&gt;cgroup

In commit 0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d, I removed checking
NULL tg.css-&gt;cgroup, but I realized I was wrong when I found reading
/proc/sched_debug can race with cgroup_create().

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: avoid accessing NULL tg.css-&gt;cgroup

In commit 0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d, I removed checking
NULL tg.css-&gt;cgroup, but I realized I was wrong when I found reading
/proc/sched_debug can race with cgroup_create().

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched: add uid information to sched_debug for CONFIG_USER_SCHED</title>
<updated>2008-12-01T19:39:50+00:00</updated>
<author>
<name>Arun R Bharadwaj</name>
<email>arun@linux.vnet.ibm.com</email>
</author>
<published>2008-12-01T15:19:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=6c415b9234a8c71f290e5d4fddc467f103f32719'/>
<id>6c415b9234a8c71f290e5d4fddc467f103f32719</id>
<content type='text'>
Impact: extend information in /proc/sched_debug

This patch adds uid information in sched_debug for CONFIG_USER_SCHED

Signed-off-by: Arun R Bharadwaj &lt;arun@linux.vnet.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: extend information in /proc/sched_debug

This patch adds uid information in sched_debug for CONFIG_USER_SCHED

Signed-off-by: Arun R Bharadwaj &lt;arun@linux.vnet.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'linus' into sched/core</title>
<updated>2008-11-19T08:44:37+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-11-19T08:44:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=3ac3ba0b396fd99550e08034b0e4c27fdf39c252'/>
<id>3ac3ba0b396fd99550e08034b0e4c27fdf39c252</id>
<content type='text'>
Conflicts:
	kernel/Makefile
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Conflicts:
	kernel/Makefile
</pre>
</div>
</content>
</entry>
<entry>
<title>sched: fix kernel warning on /proc/sched_debug access</title>
<updated>2008-11-16T07:07:15+00:00</updated>
<author>
<name>Ingo Molnar</name>
<email>mingo@elte.hu</email>
</author>
<published>2008-11-16T07:07:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=29d7b90c15035741d15421b36000509212b3e135'/>
<id>29d7b90c15035741d15421b36000509212b3e135</id>
<content type='text'>
Luis Henriques reported that with CONFIG_PREEMPT=y + CONFIG_PREEMPT_DEBUG=y +
CONFIG_SCHED_DEBUG=y + CONFIG_LATENCYTOP=y enabled, the following warning
triggers when using latencytop:

&gt; [  775.663239] BUG: using smp_processor_id() in preemptible [00000000] code: latencytop/6585
&gt; [  775.663303] caller is native_sched_clock+0x3a/0x80
&gt; [  775.663314] Pid: 6585, comm: latencytop Tainted: G        W 2.6.28-rc4-00355-g9c7c354 #1
&gt; [  775.663322] Call Trace:
&gt; [  775.663343]  [&lt;ffffffff803a94e4&gt;] debug_smp_processor_id+0xe4/0xf0
&gt; [  775.663356]  [&lt;ffffffff80213f7a&gt;] native_sched_clock+0x3a/0x80
&gt; [  775.663368]  [&lt;ffffffff80213e19&gt;] sched_clock+0x9/0x10
&gt; [  775.663381]  [&lt;ffffffff8024550d&gt;] proc_sched_show_task+0x8bd/0x10e0
&gt; [  775.663395]  [&lt;ffffffff8034466e&gt;] sched_show+0x3e/0x80
&gt; [  775.663408]  [&lt;ffffffff8031039b&gt;] seq_read+0xdb/0x350
&gt; [  775.663421]  [&lt;ffffffff80368776&gt;] ? security_file_permission+0x16/0x20
&gt; [  775.663435]  [&lt;ffffffff802f4198&gt;] vfs_read+0xc8/0x170
&gt; [  775.663447]  [&lt;ffffffff802f4335&gt;] sys_read+0x55/0x90
&gt; [  775.663460]  [&lt;ffffffff8020c67a&gt;] system_call_fastpath+0x16/0x1b
&gt; ...

This breakage was caused by me via:

  7cbaef9: sched: optimize sched_clock() a bit

Change the calls to cpu_clock().

Reported-by: Luis Henriques &lt;henrix@sapo.pt&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Luis Henriques reported that with CONFIG_PREEMPT=y + CONFIG_PREEMPT_DEBUG=y +
CONFIG_SCHED_DEBUG=y + CONFIG_LATENCYTOP=y enabled, the following warning
triggers when using latencytop:

&gt; [  775.663239] BUG: using smp_processor_id() in preemptible [00000000] code: latencytop/6585
&gt; [  775.663303] caller is native_sched_clock+0x3a/0x80
&gt; [  775.663314] Pid: 6585, comm: latencytop Tainted: G        W 2.6.28-rc4-00355-g9c7c354 #1
&gt; [  775.663322] Call Trace:
&gt; [  775.663343]  [&lt;ffffffff803a94e4&gt;] debug_smp_processor_id+0xe4/0xf0
&gt; [  775.663356]  [&lt;ffffffff80213f7a&gt;] native_sched_clock+0x3a/0x80
&gt; [  775.663368]  [&lt;ffffffff80213e19&gt;] sched_clock+0x9/0x10
&gt; [  775.663381]  [&lt;ffffffff8024550d&gt;] proc_sched_show_task+0x8bd/0x10e0
&gt; [  775.663395]  [&lt;ffffffff8034466e&gt;] sched_show+0x3e/0x80
&gt; [  775.663408]  [&lt;ffffffff8031039b&gt;] seq_read+0xdb/0x350
&gt; [  775.663421]  [&lt;ffffffff80368776&gt;] ? security_file_permission+0x16/0x20
&gt; [  775.663435]  [&lt;ffffffff802f4198&gt;] vfs_read+0xc8/0x170
&gt; [  775.663447]  [&lt;ffffffff802f4335&gt;] sys_read+0x55/0x90
&gt; [  775.663460]  [&lt;ffffffff8020c67a&gt;] system_call_fastpath+0x16/0x1b
&gt; ...

This breakage was caused by me via:

  7cbaef9: sched: optimize sched_clock() a bit

Change the calls to cpu_clock().

Reported-by: Luis Henriques &lt;henrix@sapo.pt&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched: include group statistics in /proc/sched_debug</title>
<updated>2008-11-11T10:44:18+00:00</updated>
<author>
<name>Bharata B Rao</name>
<email>bharata@linux.vnet.ibm.com</email>
</author>
<published>2008-11-10T16:04:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=ff9b48c3598732926fa09afd7f526981c32a48cc'/>
<id>ff9b48c3598732926fa09afd7f526981c32a48cc</id>
<content type='text'>
Impact: extend /proc/sched_debug info

Since the statistics of a group entity isn't exported directly from the
kernel, it becomes difficult to obtain some of the group statistics.
For example, the current method to obtain exec time of a group entity
is not always accurate. One has to read the exec times of all
the tasks(/proc/&lt;pid&gt;/sched) in the group and add them. This method
fails (or becomes difficult) if we want to collect stats of a group over
a duration where tasks get created and terminated.

This patch makes it easier to obtain group stats by directly including
them in /proc/sched_debug. Stats like group exec time would help user
programs (like LTP) to accurately measure the group fairness.

An example output of group stats from /proc/sched_debug:

cfs_rq[3]:/3/a/1
  .exec_clock                    : 89.598007
  .MIN_vruntime                  : 0.000001
  .min_vruntime                  : 256300.970506
  .max_vruntime                  : 0.000001
  .spread                        : 0.000000
  .spread0                       : -25373.372248
  .nr_running                    : 0
  .load                          : 0
  .yld_exp_empty                 : 0
  .yld_act_empty                 : 0
  .yld_both_empty                : 0
  .yld_count                     : 4474
  .sched_switch                  : 0
  .sched_count                   : 40507
  .sched_goidle                  : 12686
  .ttwu_count                    : 15114
  .ttwu_local                    : 11950
  .bkl_count                     : 67
  .nr_spread_over                : 0
  .shares                        : 0
  .se-&gt;exec_start                : 113676.727170
  .se-&gt;vruntime                  : 1592.612714
  .se-&gt;sum_exec_runtime          : 89.598007
  .se-&gt;wait_start                : 0.000000
  .se-&gt;sleep_start               : 0.000000
  .se-&gt;block_start               : 0.000000
  .se-&gt;sleep_max                 : 0.000000
  .se-&gt;block_max                 : 0.000000
  .se-&gt;exec_max                  : 1.000282
  .se-&gt;slice_max                 : 1.999750
  .se-&gt;wait_max                  : 54.981093
  .se-&gt;wait_sum                  : 217.610521
  .se-&gt;wait_count                : 50
  .se-&gt;load.weight               : 2

Signed-off-by: Bharata B Rao &lt;bharata@linux.vnet.ibm.com&gt;
Acked-by: Srivatsa Vaddagiri &lt;vatsa@linux.vnet.ibm.com&gt;
Acked-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: extend /proc/sched_debug info

Since the statistics of a group entity isn't exported directly from the
kernel, it becomes difficult to obtain some of the group statistics.
For example, the current method to obtain exec time of a group entity
is not always accurate. One has to read the exec times of all
the tasks(/proc/&lt;pid&gt;/sched) in the group and add them. This method
fails (or becomes difficult) if we want to collect stats of a group over
a duration where tasks get created and terminated.

This patch makes it easier to obtain group stats by directly including
them in /proc/sched_debug. Stats like group exec time would help user
programs (like LTP) to accurately measure the group fairness.

An example output of group stats from /proc/sched_debug:

cfs_rq[3]:/3/a/1
  .exec_clock                    : 89.598007
  .MIN_vruntime                  : 0.000001
  .min_vruntime                  : 256300.970506
  .max_vruntime                  : 0.000001
  .spread                        : 0.000000
  .spread0                       : -25373.372248
  .nr_running                    : 0
  .load                          : 0
  .yld_exp_empty                 : 0
  .yld_act_empty                 : 0
  .yld_both_empty                : 0
  .yld_count                     : 4474
  .sched_switch                  : 0
  .sched_count                   : 40507
  .sched_goidle                  : 12686
  .ttwu_count                    : 15114
  .ttwu_local                    : 11950
  .bkl_count                     : 67
  .nr_spread_over                : 0
  .shares                        : 0
  .se-&gt;exec_start                : 113676.727170
  .se-&gt;vruntime                  : 1592.612714
  .se-&gt;sum_exec_runtime          : 89.598007
  .se-&gt;wait_start                : 0.000000
  .se-&gt;sleep_start               : 0.000000
  .se-&gt;block_start               : 0.000000
  .se-&gt;sleep_max                 : 0.000000
  .se-&gt;block_max                 : 0.000000
  .se-&gt;exec_max                  : 1.000282
  .se-&gt;slice_max                 : 1.999750
  .se-&gt;wait_max                  : 54.981093
  .se-&gt;wait_sum                  : 217.610521
  .se-&gt;wait_count                : 50
  .se-&gt;load.weight               : 2

Signed-off-by: Bharata B Rao &lt;bharata@linux.vnet.ibm.com&gt;
Acked-by: Srivatsa Vaddagiri &lt;vatsa@linux.vnet.ibm.com&gt;
Acked-by: Dhaval Giani &lt;dhaval@linux.vnet.ibm.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched: clean up debug info</title>
<updated>2008-11-10T09:51:51+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2008-11-10T09:46:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=5ac5c4d604bf894ef672a7971d03fefdc7ea7e49'/>
<id>5ac5c4d604bf894ef672a7971d03fefdc7ea7e49</id>
<content type='text'>
Impact: clean up and fix debug info printout

While looking over the sched_debug code I noticed that we printed the rq
schedstats for every cfs_rq, ammend this.

Also change nr_spead_over into an int, and fix a little buglet in
min_vruntime printing.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: clean up and fix debug info printout

While looking over the sched_debug code I noticed that we printed the rq
schedstats for every cfs_rq, ammend this.

Also change nr_spead_over into an int, and fix a little buglet in
min_vruntime printing.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched debug: remove NULL checking in print_cfs/rt_rq()</title>
<updated>2008-11-04T09:23:18+00:00</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-11-04T08:17:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d'/>
<id>0a0db8f5c9d4bbb9bbfcc2b6cb6bce2d0ef4d73d</id>
<content type='text'>
Impact: cleanup

cfs-&gt;tg is initialized in init_tg_cfs_entry() with tg != NULL, and
will never be invalidated to NULL. And the underlying cgroup of a
valid task_group is always valid.

Same for rt-&gt;tg.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: cleanup

cfs-&gt;tg is initialized in init_tg_cfs_entry() with tg != NULL, and
will never be invalidated to NULL. And the underlying cgroup of a
valid task_group is always valid.

Same for rt-&gt;tg.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched: change sched_debug's mode to 0444</title>
<updated>2008-10-30T10:37:57+00:00</updated>
<author>
<name>Li Zefan</name>
<email>lizf@cn.fujitsu.com</email>
</author>
<published>2008-10-30T07:23:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a9cf4ddb3b2ce03c3027929b22a920aeff933009'/>
<id>a9cf4ddb3b2ce03c3027929b22a920aeff933009</id>
<content type='text'>
Impact: change /proc/sched/debug from rw-r--r-- to r--r--r--

/proc/sched_debug is read-only.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Impact: change /proc/sched/debug from rw-r--r-- to r--r--r--

/proc/sched_debug is read-only.

Signed-off-by: Li Zefan &lt;lizf@cn.fujitsu.com&gt;
Acked-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[PATCH] signal, procfs: some lock_task_sighand() users do not need rcu_read_lock()</title>
<updated>2008-10-10T00:18:57+00:00</updated>
<author>
<name>Lai Jiangshan</name>
<email>laijs@cn.fujitsu.com</email>
</author>
<published>2008-10-04T20:51:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=a6bebbc87a8c16eabb6bd5c6fd2d994be0236fba'/>
<id>a6bebbc87a8c16eabb6bd5c6fd2d994be0236fba</id>
<content type='text'>
lock_task_sighand() make sure task-&gt;sighand is being protected,
so we do not need rcu_read_lock().
[ exec() will get task-&gt;sighand-&gt;siglock before change task-&gt;sighand! ]

But code using rcu_read_lock() _just_ to protect lock_task_sighand()
only appear in procfs. (and some code in procfs use lock_task_sighand()
without such redundant protection.)

Other subsystem may put lock_task_sighand() into rcu_read_lock()
critical region, but these rcu_read_lock() are used for protecting
"for_each_process()", "find_task_by_vpid()" etc. , not for protecting
lock_task_sighand().

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
[ok from Oleg]
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
lock_task_sighand() make sure task-&gt;sighand is being protected,
so we do not need rcu_read_lock().
[ exec() will get task-&gt;sighand-&gt;siglock before change task-&gt;sighand! ]

But code using rcu_read_lock() _just_ to protect lock_task_sighand()
only appear in procfs. (and some code in procfs use lock_task_sighand()
without such redundant protection.)

Other subsystem may put lock_task_sighand() into rcu_read_lock()
critical region, but these rcu_read_lock() are used for protecting
"for_each_process()", "find_task_by_vpid()" etc. , not for protecting
lock_task_sighand().

Signed-off-by: Lai Jiangshan &lt;laijs@cn.fujitsu.com&gt;
[ok from Oleg]
Signed-off-by: Alexey Dobriyan &lt;adobriyan@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>sched: add full schedstats to /proc/sched_debug</title>
<updated>2008-06-27T12:31:31+00:00</updated>
<author>
<name>Peter Zijlstra</name>
<email>a.p.zijlstra@chello.nl</email>
</author>
<published>2008-06-27T11:41:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.toradex.cn/cgit/linux-toradex.git/commit/?id=32df2ee86a580f70f2dbb90cf81f413aa655f838'/>
<id>32df2ee86a580f70f2dbb90cf81f413aa655f838</id>
<content type='text'>
show all the schedstats in /debug/sched_debug as well.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Srivatsa Vaddagiri &lt;vatsa@linux.vnet.ibm.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
show all the schedstats in /debug/sched_debug as well.

Signed-off-by: Peter Zijlstra &lt;a.p.zijlstra@chello.nl&gt;
Cc: Srivatsa Vaddagiri &lt;vatsa@linux.vnet.ibm.com&gt;
Cc: Mike Galbraith &lt;efault@gmx.de&gt;
Signed-off-by: Ingo Molnar &lt;mingo@elte.hu&gt;
</pre>
</div>
</content>
</entry>
</feed>
