Re: [PATCH v3] trace: Add per_cpu ring buffer control files

From: Vaibhav Nagarnaik
Date: Mon Aug 22 2011 - 21:17:16 EST


On Mon, Aug 22, 2011 at 5:49 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> On Mon, 2011-08-22 at 15:09 -0700, Vaibhav Nagarnaik wrote:
>>
>> @@ -3740,10 +3757,6 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a,
>>           !cpumask_test_cpu(cpu, buffer_b->cpumask))
>>               goto out;
>>
>> -     /* At least make sure the two buffers are somewhat the same */
>> -     if (buffer_a->pages != buffer_b->pages)
>> -             goto out;
>> -
>>       ret = -EAGAIN;
>>
>>       if (ring_buffer_flags != RB_BUFFERS_ON)
>> @@ -3758,6 +3771,12 @@ int ring_buffer_swap_cpu(struct ring_buffer *buffer_a,
>>       cpu_buffer_a = buffer_a->buffers[cpu];
>>       cpu_buffer_b = buffer_b->buffers[cpu];
>
> I would move the cpu_buffer_(ab) assignments up instead, as I want the
> EINVAL to have dominance. The record_disable just says that we are
> temporarily out of commission, when in fact it could be invalid. Thus
> the invalid conditions need to be treated first.
>
> -- Steve
>

Sure. I am sending an updated patch.


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