mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Vaibhav Nagarnaik <vnagarnaik@google.com>
Cc: Laurent Chavey <chavey@google.com>,
	Justin Teravest <teravest@google.com>,
	David Sharp <dhsharp@google.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] tracing: Merge separate resize loops
Date: Fri, 18 May 2012 21:56:00 -0400	[thread overview]
Message-ID: <1337392560.7562.21.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <1337372991-14783-1-git-send-email-vnagarnaik@google.com>

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:



  reply	other threads:[~2012-05-19  1:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-18 20:29 Vaibhav Nagarnaik
2012-05-19  1:56 ` Steven Rostedt [this message]
2012-05-19  3:00   ` Vaibhav Nagarnaik
2012-05-19  3:19     ` Steven Rostedt
2012-05-19  4:57       ` Vaibhav Nagarnaik
2012-05-21  9:44 ` [tip:perf/core] ring-buffer: " tip-bot for Vaibhav Nagarnaik

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1337392560.7562.21.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=chavey@google.com \
    --cc=dhsharp@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=teravest@google.com \
    --cc=vnagarnaik@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®