[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <57864732.4080901@hpe.com>
Date: Wed, 13 Jul 2016 09:50:42 -0400
From: Waiman Long <waiman.long@....com>
To: Pan Xinhui <xinhui.pan@...ux.vnet.ibm.com>
CC: <linux-kernel@...r.kernel.org>, <peterz@...radead.org>,
<mingo@...hat.com>
Subject: Re: [PATCH] locking/pvqspinlock: Fix a bug in qstat_read()
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@...ux.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@....com>
Powered by blists - more mailing lists