lkml.org 
[lkml]   [2009]   [Oct]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [PATCH RFC] sched: add notifier for process migration

    * Jeremy Fitzhardinge <jeremy@goop.org> wrote:

    > @@ -1981,6 +1989,12 @@ void set_task_cpu(struct task_struct *p, unsigned int new_cpu)
    > #endif
    > perf_swcounter_event(PERF_COUNT_SW_CPU_MIGRATIONS,
    > 1, 1, NULL, 0);
    > +
    > + tmn.task = p;
    > + tmn.from_cpu = old_cpu;
    > + tmn.to_cpu = new_cpu;
    > +
    > + atomic_notifier_call_chain(&task_migration_notifier, 0, &tmn);

    We already have one event notifier there - look at the
    perf_swcounter_event() callback. Why add a second one for essentially
    the same thing?

    We should only put a single callback there - a tracepoint defined via
    TRACE_EVENT() - and any secondary users can register a callback to the
    tracepoint itself.

    There's many similar places in the kernel - with notifier chains and
    also with a need to get tracepoints there. The fastest (and most
    consistent) solution is to add just a single event callback facility.

    Ingo


    \
     
     \ /
      Last update: 2009-10-14 09:15    [W:0.021 / U:0.024 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site