lkml.org 
[lkml]   [2012]   [May]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] tracing: Merge separate resize loops
From
Date
On Fri, 2012-05-18 at 13:29 -0700, Vaibhav Nagarnaik wrote:
>
> /* wait for all the updates to complete */
> for_each_buffer_cpu(buffer, cpu) {
> cpu_buffer = buffer->buffers[cpu];
> - if (!cpu_buffer->nr_pages_to_update||
> - !cpu_online(cpu))
> + if (!cpu_buffer->nr_pages_to_update)
> continue;
>

Why did you make this change? As we only need to wait for completions.

> - wait_for_completion(&cpu_buffer->update_completion);
> - /* reset this value */
> + if (cpu_online(cpu))
> + wait_for_completion(&cpu_buffer->update_done);
> cpu_buffer->nr_pages_to_update = 0;

Or was the original patch buggy, where we never set nr_page_to_update to
zero for the offline case?

-- Steve

> }
>
> put_online_cpus();
> } else {
> cpu_buffer = buffer->buffers[cpu_id];
> +
> if (nr_pages == cpu_buffer->nr_pages)
> goto out;
>
> @@ -1588,13 +1579,12 @@ int ring_buffer_resize(struct ring_buffer *buffer, unsigned long size,
> if (cpu_online(cpu_id)) {
> schedule_work_on(cpu_id,
> &cpu_buffer->update_pages_work);
> - wait_for_completion(&cpu_buffer->update_completion);
> + wait_for_completion(&cpu_buffer->update_done);
> } else
> rb_update_pages(cpu_buffer);
>
> - put_online_cpus();
> - /* reset this value */
> cpu_buffer->nr_pages_to_update = 0;
> + put_online_cpus();
> }
>
> out:




\
 
 \ /
  Last update: 2012-05-19 04:01    [W:0.059 / U:10.116 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site