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 23:19:13 -0400	[thread overview]
Message-ID: <1337397553.7562.24.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <CAL26m8KwqabX1TqOcrVZC1cAFyzbo6fKPB44jcrQfqDytNfANA@mail.gmail.com>

On Fri, 2012-05-18 at 20:00 -0700, Vaibhav Nagarnaik wrote:
> On Fri, May 18, 2012 at 6:56 PM, Steven Rostedt <rostedt@goodmis.org> wrote:
> > 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?
> 
> I don't see a bug, since at the start of the resize operation, we
> always recalculate this value. It will be reset to 0, if there are no
> updates. I set it to zero at the end just as a precautionary measure.

But if there were updates on a offline CPU, then the original patch
would not have set this to zero at the end.

Or are you just saying that we don't need to set this to zero, as it
isn't used later on? And when we re-enter this function (where its the
only place, and what it calls, that uses nr_page_to_update), it gets
reset.

IOW, this reset is just a "clean up" of the nr_pages_to_update. Right?

-- Steve



  reply	other threads:[~2012-05-19  3:19 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
2012-05-19  3:00   ` Vaibhav Nagarnaik
2012-05-19  3:19     ` Steven Rostedt [this message]
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=1337397553.7562.24.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®