[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.1.10.0809300805140.30533@gandalf.stny.rr.com>
Date: Tue, 30 Sep 2008 08:06:50 -0400 (EDT)
From: Steven Rostedt <rostedt@...dmis.org>
To: Ingo Molnar <mingo@...e.hu>
cc: linux-kernel@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Mathieu Desnoyers <compudj@...stal.dyndns.org>,
Steven Rostedt <srostedt@...hat.com>
Subject: Re: [PATCH 2/6] Unified trace buffer
On Tue, 30 Sep 2008, Ingo Molnar wrote:
>
> * Steven Rostedt <rostedt@...dmis.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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists