Skip to contentSkip to conversation

perfcounters: clean up rotate_percpu

PATCH Superseded MinChan Kim 1 participant 2 messages Feb 18, 2009

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perfcounters: clean up rotate_percpu

Ingo implemented rotate function at 235c7fc7c500e4fd1700c4ad01b5612bcdc1b449. I think he want to implement rotate_percpu but he don't implement it yet.

If we need not it immediately,
It would be better to remove it until we will need it again.

---
 kernel/perf_counter.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
kernel/perf_counter.c +0 -9
index ad62965..007b219 100644
@@ -972,18 +972,9 @@ void perf_counter_task_tick(struct task_struct *curr, int cpu)
 {
 	struct perf_cpu_context *cpuctx = &per_cpu(perf_cpu_context, cpu);
 	struct perf_counter_context *ctx = &curr->perf_counter_ctx;
-	const int rotate_percpu = 0;
 
-	if (rotate_percpu)
-		perf_counter_cpu_sched_out(cpuctx);
 	perf_counter_task_sched_out(curr, cpu);
-
-	if (rotate_percpu)
-		rotate_ctx(&cpuctx->ctx);
 	rotate_ctx(ctx);
-
-	if (rotate_percpu)
-		perf_counter_cpu_sched_in(cpuctx, cpu);
 	perf_counter_task_sched_in(curr, cpu);
 }
 
Signature · 6 lines
1.5.4.3


-- 
Kinds Regards
MinChan Kim
#1 lore raw

I missed one thing. so I will resend next version.

Quoted 43 lines · MinChan Kim

Ingo implemented rotate function at 235c7fc7c500e4fd1700c4ad01b5612bcdc1b449. I think he want to implement rotate_percpu but he don't implement it yet.

If we need not it immediately,
It would be better to remove it until we will need it again.

---
 kernel/perf_counter.c |    9 ---------
 1 files changed, 0 insertions(+), 9 deletions(-)
kernel/perf_counter.c +0 -10
index ad62965..007b219 100644
@@ -972,18 +972,9 @@ void perf_counter_task_tick(struct task_struct *curr, int cpu)
 {
       struct perf_cpu_context *cpuctx = &per_cpu(perf_cpu_context, cpu);
       struct perf_counter_context *ctx = &curr->perf_counter_ctx;
-       const int rotate_percpu = 0;
 
-       if (rotate_percpu)
-               perf_counter_cpu_sched_out(cpuctx);
       perf_counter_task_sched_out(curr, cpu);
-
-       if (rotate_percpu)
-               rotate_ctx(&cpuctx->ctx);
       rotate_ctx(ctx);
-
-       if (rotate_percpu)
-               perf_counter_cpu_sched_in(cpuctx, cpu);
       perf_counter_task_sched_in(curr, cpu);
 }
 
--

1.5.4.3

--
Kinds Regards
MinChan Kim

Signature · 2 lines
Kinds regards,
MinChan Kim