[lkml]   [2009]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH 0/4] workqueue_tracepoint: Add worklet tracepoints for worklet lifecycle tracing
    On 04/28, Frederic Weisbecker wrote:
    > On Mon, Apr 27, 2009 at 05:02:41PM +0200, Oleg Nesterov wrote:
    > >
    > > I must admit, I don't really understand why trace_workqueue.c uses
    > > cwq->thread as a "primary key". I have the feeling we can simplify
    > > this code if we pass "struct workqueue_struct *" instead, but I am
    > > not sure.
    > Indeed, I wanted to use it as the identifier first. The problem
    > is that this structure is privately defined inside kernel/workqueue.c

    Perhaps we have to export some bits or add some simple helpers to
    workqueue.c. But I am not sure trace/trace_workqueue.c actually needs
    any additional info. Again, we can use "struct workqueue_struct *" as
    a "void *", and probe_workqueue_creation() can use alloc_percpu() to
    record the events per-cpu. (_Perhaps_, we can also add some fields
    to workqueue_struct or cpu_workqueue_struct under #ifdef and eliminate
    the list search code in trace_workqueue.c).

    > But actually it's not really a 1:1 matching in CONFIG_HOTPLUG_CPU
    > case, because the thread can destroyed and the cpu_workqueue assigned
    > with a new one later.

    Indeed, I also thought about this. This is subjective, but perhaps it
    is better to keep the history. If not, we can clear it on CPU_DEAD.

    But let me repeat, I am not very sure these changes are really good,
    and I didn't try to really think about them. Even _if_ I am right
    we can do this later.

    > I'm currently gathering Zhaolei patches and I will push them all in
    > git://
    > tracing/workqueue

    Thanks! Will try to look when I have the chance. Not that I think
    I can really help though ;)


     \ /
      Last update: 2009-04-28 18:51    [W:0.031 / U:1.356 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site