lkml.org 
[lkml]   [2008]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/6] Unified trace buffer

On Tue, 30 Sep 2008, Ingo Molnar wrote:

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



\
 
 \ /
  Last update: 2008-09-30 14:09    [W:0.044 / U:1.992 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site