Re: [PATCH 1/4 tip/sched/core] sched: rename preempt_notifier tosched_notifier and always enable it

From: Paul Mackerras
Date: Thu Nov 26 2009 - 23:20:16 EST


Ingo Molnar writes:

> The sched notifiers and the various event notifiers we have in the same
> codepaths should really be unified into a single callback framework.
>
> We have these _5_ callbacks:
>
> ...
> perf_event_task_sched_out(prev, next, cpu);
> ...
> fire_sched_out_notifiers(prev, next);
> ...
> trace_sched_switch(rq, prev, next);
> ...
> perf_event_task_sched_in(current, cpu_of(rq));
> fire_sched_in_notifiers(current);
> ...
>
> That could be done with just two callbacks - one for sched-out, one for
> sched-in.
>
> The best way to do that would be to use two TRACE_EVENT() callbacks,
> make them unconditional and register to them. (with wrappers to make it
> all convenient to use)

I'd rather 5 explicit direct function calls than two direct calls and
five indirect function calls, actually...

Paul.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/