Re: [RFC PATCH 4/6] relay: add relay_reserve_cpu()

From: Tom Zanussi
Date: Thu Jul 05 2007 - 12:02:18 EST


On Tue, 2007-07-03 at 23:17 -0400, Mathieu Desnoyers wrote:
> * Tom Zanussi (zanussi@xxxxxxxxxx) wrote:
> > This patch adds the ability to explicitly specify the per-cpu buffer
> > to reserve space in. Needed for early DTI tracing.
> >
>
> This should come with the ability to tell relay where the already
> allocated static buffers are. Can you tell me a little more on why the
> standard relay_reserve would not do the job? Is smp_processor_id() not
> ready to output a sensible CPU id yet ?
>

In the case of early tracing, the DTI code uses a global buffer and
saves the cpuid along with each event. Later, when the relay channel is
available, the relogging code wants to put each event in the appropriate
per-cpu relay buffer. The standard relay_reserve() always uses the
current cpuid, rather than the cpuid attached to the event, which is not
what we want. relay_reserve_cpu() simply allows a cpuid other than the
current one to be used.

Tom




-
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/