From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: kernel-janitors@vger.kernel.org
Subject: Re: rcu: Call mod_timer() correctly in wake_nocb_leader_defer()
Date: Wed, 17 May 2017 20:21:48 +0000 [thread overview]
Message-ID: <20170517202148.GK3956@linux.vnet.ibm.com> (raw)
In-Reply-To: <20170517194446.yz42z4wwrplbngxn@mwanda>
On Wed, May 17, 2017 at 10:44:46PM +0300, Dan Carpenter wrote:
> Smatch complains that:
>
> kernel/rcu/tree_plugin.h:1838 wake_nocb_leader_defer()
> warn: mod_timer() takes an absolute time not an offset.
>
> which is true.
>
> Fixes: ebf7068a4396 ("rcu: Use timer as backstop for NOCB deferred wakeups")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Good catch, and color me slow and stupid!!!
I will fold this into the original commit with the following attribution:
[ paulmck: Dan Williams fix for mod_timer() bug detected by smatch. ]
Does that work for you?
Thanx, Paul
PS. This likely fixes the bug that causes about one temporary
grace-period stall every 20 hours of rcutorture testing on the
TREE01 test scenario. I finally bisected to it, but it would take
me through the weekend to accumulate statistical confidence in
my bisection. So it will take me some time to establish
statistcal confidence in this fix, but hey, a fix!!! ;-)
Thank you!!!
> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
> index 34dbd0aad732..74492f20c252 100644
> --- a/kernel/rcu/tree_plugin.h
> +++ b/kernel/rcu/tree_plugin.h
> @@ -1835,7 +1835,7 @@ static void wake_nocb_leader_defer(struct rcu_data *rdp, int waketype,
> trace_rcu_nocb_wake(rdp->rsp->name, rdp->cpu, reason);
> raw_spin_unlock_irqrestore(&rdp->nocb_lock, flags);
> if (needtimer)
> - mod_timer(&rdp->nocb_timer, 1);
> + mod_timer(&rdp->nocb_timer, jiffies + 1);
> }
>
> /*
>
next prev parent reply other threads:[~2017-05-17 20:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-17 19:44 rcu: Call mod_timer() correctly in wake_nocb_leader_defer() Dan Carpenter
2017-05-17 20:21 ` Paul E. McKenney [this message]
2017-05-17 20:37 ` Dan Carpenter
2017-05-17 21:15 ` Paul E. McKenney
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=20170517202148.GK3956@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=kernel-janitors@vger.kernel.org \
/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