Thread (28 messages) 28 messages, 5 authors, 2009-11-27

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

From: Peter Zijlstra <peterz@infradead.org>
Date: 2009-11-26 12:41:08
Also in: lkml

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..
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help