Messages in this thread Patch in this message | | | From | Tejun Heo <> | Subject | [PATCH 01/12] sched: drop @cpu argument from sched_in preempt notifier | Date | Tue, 4 May 2010 14:38:33 +0200 |
| |
@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 *preempt_notifier_to_vcpu(struct preempt_notifier *pn) return container_of(pn, struct kvm_vcpu, preempt_notifier); } -static void kvm_sched_in(struct preempt_notifier *pn, int cpu) +static void kvm_sched_in(struct preempt_notifier *pn) { struct kvm_vcpu *vcpu = preempt_notifier_to_vcpu(pn); - kvm_arch_vcpu_load(vcpu, cpu); + kvm_arch_vcpu_load(vcpu, raw_smp_processor_id()); } static void kvm_sched_out(struct preempt_notifier *pn, -- 1.6.4.2
| |