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

From: Peter Zijlstra
Date: Thu Nov 26 2009 - 07:41:19 EST


On Thu, 2009-11-26 at 12:56 +0100, Ingo Molnar wrote:
>
> I wouldnt mind some form of TRACE_EVENT_CALLBACK() thing whose callback
> facility is always available, even if CONFIG_PERF_EVENTS and
> CONFIG_TRACING is disabled.

CALLBACK_EVENT() would be my preferred name, and shouldn't live anywhere
near the regular tracing bits, the tracing bits could simply add another
callback in it when enabled.

> It might grow out of notifier.h - albeit i suspect the shorter path
> would be to grow it from TRACE_EVENT().
>
> ( The various pagefault notifiers in arch/x86/mm/fault.c could use this
> facility too. )
>
> What we definitely dont want is the proliferation of callbacks.

Sure, a first approach would be to find something that can cover both
these extended preempt notifiers and the mmu notifier stuff, clearly
notifier.h isn't cutting it anymore, and rolling these things yourself
has obvious disadvantages like not being to add generic bits without
having to touch all of them.

The big downside from TRACE_EVENT() like things is the implementation,
its a horrid macro mess. They're nice enough when you don't have to
touch the implementation, but rather painful when you do have to.

But I guess there's just no real alternative..
--
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/