Prev: [PATCH 05/12] perf: move perf_event_task_sched_in() next to fire_sched_notifiers_in()
Next: [PATCH 09/12] perf: factor out perf_event_switch_clones()
From: Tejun Heo on 4 May 2010 08:50 @cpu parameter is superflous. Drop it. This will help unifying notifiers in sched. Signed-off-by: Tejun Heo <tj(a)kernel.org> Cc: Avi Kivity <avi(a)redhat.com> Cc: Peter Zijlstra <peterz(a)infradead.org> Cc: Mike Galbraith <efault(a)gmx.de> Cc: Ingo Molnar <mingo(a)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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |