aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/sched.c
diff options
context:
space:
mode:
authorKen Chen <kenchen@google.com>2007-10-18 15:32:56 -0400
committerIngo Molnar <mingo@elte.hu>2007-10-18 15:32:56 -0400
commit480b9434c542ddf2833aaed3dabba71bc0b787b5 (patch)
tree78c2638ac583cc57165ee1393ebbbbbe367f46fb /kernel/sched.c
parentcc4ea79588e688ea9b1161650979a194dd709169 (diff)
sched: reduce schedstat variable overhead a bit
schedstat is useful in investigating CPU scheduler behavior. Ideally, I think it is beneficial to have it on all the time. However, the cost of turning it on in production system is quite high, largely due to number of events it collects and also due to its large memory footprint. Most of the fields probably don't need to be full 64-bit on 64-bit arch. Rolling over 4 billion events will most like take a long time and user space tool can be made to accommodate that. I'm proposing kernel to cut back most of variable width on 64-bit system. (note, the following patch doesn't affect 32-bit system). Signed-off-by: Ken Chen <kenchen@google.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/sched.c')
-rw-r--r--kernel/sched.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/sched.c b/kernel/sched.c
index b19cc5b79e26..b60f8a5ae2be 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -332,22 +332,22 @@ struct rq {
332 struct sched_info rq_sched_info; 332 struct sched_info rq_sched_info;
333 333
334 /* sys_sched_yield() stats */ 334 /* sys_sched_yield() stats */
335 unsigned long yld_exp_empty; 335 unsigned int yld_exp_empty;
336 unsigned long yld_act_empty; 336 unsigned int yld_act_empty;
337 unsigned long yld_both_empty; 337 unsigned int yld_both_empty;
338 unsigned long yld_count; 338 unsigned int yld_count;
339 339
340 /* schedule() stats */ 340 /* schedule() stats */
341 unsigned long sched_switch; 341 unsigned int sched_switch;
342 unsigned long sched_count; 342 unsigned int sched_count;
343 unsigned long sched_goidle; 343 unsigned int sched_goidle;
344 344
345 /* try_to_wake_up() stats */ 345 /* try_to_wake_up() stats */
346 unsigned long ttwu_count; 346 unsigned int ttwu_count;
347 unsigned long ttwu_local; 347 unsigned int ttwu_local;
348 348
349 /* BKL stats */ 349 /* BKL stats */
350 unsigned long bkl_count; 350 unsigned int bkl_count;
351#endif 351#endif
352 struct lock_class_key rq_lock_key; 352 struct lock_class_key rq_lock_key;
353}; 353};