Re: [PATCH 3/3] tracing/function-return-tracer: add the overrun field

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Ingo Molnar
Date: Friday, November 21, 2008 - 12:48 pm

* Frédéric Weisbecker <fweisbec@gmail.com> wrote:


i'd suggest a different approach that is simpler:

- step0: set flag that "all newly created tasks need the array 
  allocated from now on".

- step1: allocate N arrays outside tasklist_lock

- step2: take tasklist_lock, loop over all tasks that exist and pass 
  in the N arrays to all tasks that still need it.

  If tasks were 'refilled', drop tasklist_lock and go back to step 1.

- step3: free N (superfluously allocated) arrays

Make N something like 32 to not get into a bad quadratic nr_tasks 
double loop in practice. (Possibly allocate arrays[32] dynamically as 
well at step0 and not have it on the kernel stack - so 32 can be 
changed to 128 or so.)

	Ingo
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH 3/3] tracing/function-return-tracer: add the overru ..., Frederic Weisbecker, (Sun Nov 16, 7:22 pm)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frederic Weisbecker, (Mon Nov 17, 11:38 am)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frédéric Weisbecker, (Tue Nov 18, 9:31 am)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frédéric Weisbecker, (Tue Nov 18, 9:47 am)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frédéric Weisbecker, (Tue Nov 18, 9:58 am)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frédéric Weisbecker, (Tue Nov 18, 10:00 am)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frédéric Weisbecker, (Wed Nov 19, 12:35 am)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frédéric Weisbecker, (Fri Nov 21, 12:39 pm)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Ingo Molnar, (Fri Nov 21, 12:48 pm)
Re: [PATCH 3/3] tracing/function-return-tracer: add the ov ..., Frédéric Weisbecker, (Fri Nov 21, 1:07 pm)