public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <waiman.long@hpe.com>
To: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Cc: <linux-kernel@vger.kernel.org>, <peterz@infradead.org>,
	<mingo@redhat.com>
Subject: Re: [PATCH] locking/pvqspinlock: Fix a bug in qstat_read()
Date: Wed, 13 Jul 2016 09:50:42 -0400	[thread overview]
Message-ID: <57864732.4080901@hpe.com> (raw)
In-Reply-To: <1468405414-3700-1-git-send-email-xinhui.pan@linux.vnet.ibm.com>

On 07/13/2016 06:23 AM, Pan Xinhui wrote:
> It's obviously wrong to set stat to NULL. So lets remove it.
> Otherwise it is always zero when we check the latency of kick/wake
>
> Signed-off-by: Pan Xinhui<xinhui.pan@linux.vnet.ibm.com>
> ---
>   kernel/locking/qspinlock_stat.h | 1 -
>   1 file changed, 1 deletion(-)
>
> diff --git a/kernel/locking/qspinlock_stat.h b/kernel/locking/qspinlock_stat.h
> index 7b0f1b9..8fa1165 100644
> --- a/kernel/locking/qspinlock_stat.h
> +++ b/kernel/locking/qspinlock_stat.h
> @@ -157,7 +157,6 @@ static ssize_t qstat_read(struct file *file, char __user *user_buf,
>   		 */
>   		if ((counter == qstat_pv_latency_kick) ||
>   		    (counter == qstat_pv_latency_wake)) {
> -			stat = 0;
>   			if (kicks)
>   				stat = DIV_ROUND_CLOSEST_ULL(stat, kicks);
>   		}

Thanks for catching that. The statement shouldn't be there.

Reviewed-by: Waiman Long <Waiman.Long@hpe.com>

  reply	other threads:[~2016-07-13 13:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 10:23 [PATCH] locking/pvqspinlock: Fix a bug in qstat_read() Pan Xinhui
2016-07-13 13:50 ` Waiman Long [this message]
2016-08-10 18:06 ` [tip:locking/core] " tip-bot for Pan Xinhui

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=57864732.4080901@hpe.com \
    --to=waiman.long@hpe.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=xinhui.pan@linux.vnet.ibm.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