On Tue, 30 Sep 2008, Ingo Molnar wrote:
quoted text >
> * Steven Rostedt <rostedt@goodmis.org> wrote:
>
> > +void ring_buffer_lock(struct ring_buffer *buffer, unsigned long *flags)
> > +{
> > + struct ring_buffer_per_cpu *cpu_buffer;
> > + int cpu;
> > +
> > + local_irq_save(*flags);
> > +
> > + for_each_buffer_cpu(buffer, cpu) {
> > + cpu_buffer = buffer->buffers[cpu];
> > + spin_lock(&cpu_buffer->lock);
> > + }
> > +}
>
> hm, that's rather unintelligent and needs to be fixed.
hm, why? It is ordered locking based on the cpu value. This is exactly
what ftrace did as well. The unlock even goes backwards max_cpu to 0.
But version 2 of this code will drop both ring_buffer_lock and unlock, but
that will come later.
-- Steve
--
unsubscribe notice To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Messages in current thread:
Re: [PATCH 2/6] Unified trace buffer , Steven Rostedt , (Tue Sep 30, 5:06 am)