login
Header Space

 
 

Re: [patch for 2.6.26 0/7] Architecture Independent Markers

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Mathieu Desnoyers <mathieu.desnoyers@...>
Cc: <akpm@...>, <linux-kernel@...>, Linus Torvalds <torvalds@...>
Date: Friday, March 28, 2008 - 5:43 am

* Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca> wrote:


it's not 6 ftrace calls, you forgot about kernel/sched_fair.c, so it's 9 
tracepoints.

note that all but the 2 core trace hooks are temporary, i used them to 
debug a specific scheduler problem. Especially one trace point: 
ftrace_all_fair_tasks() is a totally ad-hoc trace-all-tasks-in-the-rq 
heavy function.

if you want to compare apples to apples, try the patch below, which 
removes the ad-hoc tracepoints.

	Ingo

------------------------>
Subject: no: ad hoc ftrace points
From: Ingo Molnar <mingo@elte.hu>
Date: Fri Mar 28 10:30:37 CET 2008

Signed-off-by: Ingo Molnar <mingo@elte.hu>
---
 kernel/sched.c      |   47 -----------------------------------------------
 kernel/sched_fair.c |    3 ---
 2 files changed, 50 deletions(-)

Index: linux/kernel/sched.c
===================================================================
--- linux.orig/kernel/sched.c
+++ linux/kernel/sched.c
@@ -2005,53 +2005,6 @@ static int sched_balance_self(int cpu, i
 
 #endif /* CONFIG_SMP */
 
-#ifdef CONFIG_CONTEXT_SWITCH_TRACER
-
-void ftrace_task(struct task_struct *p, void *__tr, void *__data)
-{
-#if 0
-	/*  
-	 * trace timeline tree
-	 */
-	__trace_special(__tr, __data,
-			p->pid, p->se.vruntime, p->se.sum_exec_runtime);
-#else
-	/*
-	 * trace balance metrics
-	 */
-	__trace_special(__tr, __data,
-			p->pid, p->se.avg_overlap, 0);
-#endif
-}
-
-void ftrace_all_fair_tasks(void *__rq, void *__tr, void *__data)
-{
-	struct task_struct *p;
-	struct sched_entity *se;
-	struct rb_node *curr;
-	struct rq *rq = __rq;
-
-	if (rq->cfs.curr) {
-		p = task_of(rq->cfs.curr);
-		ftrace_task(p, __tr, __data);
-	}
-	if (rq->cfs.next) {
-		p = task_of(rq->cfs.next);
-		ftrace_task(p, __tr, __data);
-	}
-
-	for (curr = first_fair(&rq->cfs); curr; curr = rb_next(curr)) {
-		se = rb_entry(curr, struct sched_entity, run_node);
-		if (!entity_is_task(se))
-			continue;
-
-		p = task_of(se);
-		ftrace_task(p, __tr, __data);
-	}
-}
-
-#endif
-
 /***
  * try_to_wake_up - wake up a thread
  * @p: the to-be-woken-up thread
Index: linux/kernel/sched_fair.c
===================================================================
--- linux.orig/kernel/sched_fair.c
+++ linux/kernel/sched_fair.c
@@ -991,8 +991,6 @@ wake_affine(struct rq *rq, struct sched_
 	if (!(this_sd->flags & SD_WAKE_AFFINE))
 		return 0;
 
-	ftrace_special(__LINE__, curr->se.avg_overlap, sync);
-	ftrace_special(__LINE__, p->se.avg_overlap, -1);
 	/*
 	 * If the currently running task will sleep within
 	 * a reasonable amount of time then attract this newly
@@ -1118,7 +1116,6 @@ static void check_preempt_wakeup(struct 
 	if (unlikely(se == pse))
 		return;
 
-	ftrace_special(__LINE__, p->pid, se->last_wakeup);
 	cfs_rq_of(pse)->next = pse;
 
 	/*
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch for 2.6.26 0/7] Architecture Independent Markers, Mathieu Desnoyers, (Thu Mar 27, 9:20 am)
Re: [patch for 2.6.26 1/7] Markers - define non optimized ma..., Mathieu Desnoyers, (Thu Mar 27, 9:04 pm)
[PATCH] Markers - remove extra format argument, Mathieu Desnoyers, (Thu Mar 27, 9:02 pm)
Re: [PATCH] Markers - remove extra format argument, Masami Hiramatsu, (Fri Mar 28, 1:35 am)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, Frank Ch. Eigler, (Thu Mar 27, 5:49 pm)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, Mathieu Desnoyers, (Thu Mar 27, 4:39 pm)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, Mathieu Desnoyers, (Sat Mar 29, 1:16 pm)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, Ingo Molnar, (Fri Mar 28, 5:43 am)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, Mathieu Desnoyers, (Fri Mar 28, 7:38 am)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, KOSAKI Motohiro, (Thu Mar 27, 1:08 pm)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, Frank Ch. Eigler, (Fri Mar 28, 9:40 am)
Re: [patch for 2.6.26 0/7] Architecture Independent Markers, Frank Ch. Eigler, (Fri Mar 28, 11:31 am)
speck-geostationary