[PATCH 01/12] sched: drop @cpu argument from sched_in preempt notifier

Previous thread: [PATCH 05/12] perf: move perf_event_task_sched_in() next to fire_sched_notifiers_in() by Tejun Heo on Tuesday, May 4, 2010 - 5:38 am. (1 message)

Next thread: [RFC PATCHSET] sched,perf: unify tracers in sched and move perf on top of TP by Tejun Heo on Tuesday, May 4, 2010 - 5:38 am. (27 messages)
From: Tejun Heo
Date: Tuesday, May 4, 2010 - 5:38 am

@cpu parameter is superflous.  Drop it.  This will help unifying
notifiers in sched.

Signed-off-by: Tejun Heo <tj@kernel.org>
Cc: Avi Kivity <avi@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Ingo Molnar <mingo@elte.hu>
---
 include/linux/preempt.h |    3 +--
 kernel/sched.c          |    2 +-
 virt/kvm/kvm_main.c     |    4 ++--
 3 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/include/linux/preempt.h b/include/linux/preempt.h
index 2e681d9..cd7d090 100644
--- a/include/linux/preempt.h
+++ b/include/linux/preempt.h
@@ -101,7 +101,6 @@ struct preempt_notifier;
  * preempt_ops - notifiers called when a task is preempted and rescheduled
  * @sched_in: we're about to be rescheduled:
  *    notifier: struct preempt_notifier for the task being scheduled
- *    cpu:  cpu we're scheduled on
  * @sched_out: we've just been preempted
  *    notifier: struct preempt_notifier for the task being preempted
  *    next: the task that's kicking us out
@@ -112,7 +111,7 @@ struct preempt_notifier;
  * difference is intentional and depended upon by its users.
  */
 struct preempt_ops {
-	void (*sched_in)(struct preempt_notifier *notifier, int cpu);
+	void (*sched_in)(struct preempt_notifier *notifier);
 	void (*sched_out)(struct preempt_notifier *notifier,
 			  struct task_struct *next);
 };
diff --git a/kernel/sched.c b/kernel/sched.c
index 6af210a..724f0e4 100644
--- a/kernel/sched.c
+++ b/kernel/sched.c
@@ -2718,7 +2718,7 @@ static void fire_sched_in_preempt_notifiers(struct task_struct *curr)
 	struct hlist_node *node;
 
 	hlist_for_each_entry(notifier, node, &curr->preempt_notifiers, link)
-		notifier->ops->sched_in(notifier, raw_smp_processor_id());
+		notifier->ops->sched_in(notifier);
 }
 
 static void
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index c82ae24..2c06489 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -2164,11 +2164,11 @@ struct kvm_vcpu ...
From: Peter Zijlstra
Date: Tuesday, May 4, 2010 - 10:11 am

This seems sensible enough.

--

Previous thread: [PATCH 05/12] perf: move perf_event_task_sched_in() next to fire_sched_notifiers_in() by Tejun Heo on Tuesday, May 4, 2010 - 5:38 am. (1 message)

Next thread: [RFC PATCHSET] sched,perf: unify tracers in sched and move perf on top of TP by Tejun Heo on Tuesday, May 4, 2010 - 5:38 am. (27 messages)