Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1705546
| Path | csiph.com!news.redatomik.org!aioe.org!bofh.it!news.nic.it!robomod |
|---|---|
| From | Neeraj Upadhyay <neeraju@codeaurora.org> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] rcu: Fix up pending cbs check in rcu_prepare_for_idle |
| Date | Mon, 07 Aug 2017 16:10:02 +0200 |
| Message-ID | <ubQTg-Rb-3@gated-at.bofh.it> (permalink) |
| References | <ubJf4-4dI-13@gated-at.bofh.it> <ubPDR-8gK-31@gated-at.bofh.it> |
| X-Original-To | paulmck@linux.vnet.ibm.com |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502114494; bh=EfoEGoojpAP+ehv5aZPOwIYSJkHub8G2QonR5toT6pU=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=mN1b/KQIh5z0PxqaYOjm/yApcdCnZuVg+LhnHB16ODHz2jH7jGT/cQjSoWGQF8wXe pzaVRlB0DZuhqPoRiI0ltDSCVJ4lkBhH5zNaWpma2/dJz6OwJzFDFfCcKQneKbUyNM KSNV6+TlxhHYtW15WzhE3MO9k9IqUM9tSq5E3doo= |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1502114493; bh=EfoEGoojpAP+ehv5aZPOwIYSJkHub8G2QonR5toT6pU=; h=Subject:To:References:Cc:From:Date:In-Reply-To:From; b=NmI0oUnsF3vPRPySnDPfNGE39OY0tUvtOZFxzU6ks+AlVwqMCx63hhLlemqIe5DJu /5YYD8KUIweetHhZPYOjy76qMuxblO/GPn/84mi8LXAu6h/1uB57MGyPOWC+07IQvL 6Kcqj0p1pqDFgJBhMGgFsyY7C6QuGQ6subGHxAD0= |
| Dmarc-Filter | OpenDMARC Filter v1.3.2 smtp.codeaurora.org D399160241 |
| Authentication-Results | pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org |
| Authentication-Results | pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=neeraju@codeaurora.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=windows-1252; format=flowed |
| Content-Transfer-Encoding | 7bit |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 45 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, linux-kernel@vger.kernel.org |
| X-Original-Date | Mon, 7 Aug 2017 19:31:27 +0530 |
| X-Original-Message-ID | <b2a79e3d-f14a-9480-bacc-e5cb398d5686@codeaurora.org> |
| X-Original-References | <1502085010-30316-1-git-send-email-neeraju@codeaurora.org> <20170807124052.GU3730@linux.vnet.ibm.com> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1705546 |
Show key headers only | View raw
On 08/07/2017 06:10 PM, Paul E. McKenney wrote:
> On Mon, Aug 07, 2017 at 11:20:10AM +0530, Neeraj Upadhyay wrote:
>> Pending cbs check in rcu_prepare_for_idle is inversed
>> in the sense that, it should accelerate if there are
>> pending cbs; but, the check does the opposite. So,
>> fix it.
>>
>> Fixes: 15fecf89e46a ("srcu: Abstract multi-tail callback list handling")
>> Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
> Good catch! Queued for review and testing.
>
> Just out of curiosity, how did you find this one?
>
> Thanx, Paul
Hi Paul, found the issue while reading the code.
>
>> ---
>> kernel/rcu/tree_plugin.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/kernel/rcu/tree_plugin.h b/kernel/rcu/tree_plugin.h
>> index 908b309..b8f51df 100644
>> --- a/kernel/rcu/tree_plugin.h
>> +++ b/kernel/rcu/tree_plugin.h
>> @@ -1493,7 +1493,7 @@ static void rcu_prepare_for_idle(void)
>> rdtp->last_accelerate = jiffies;
>> for_each_rcu_flavor(rsp) {
>> rdp = this_cpu_ptr(rsp->rda);
>> - if (rcu_segcblist_pend_cbs(&rdp->cblist))
>> + if (!rcu_segcblist_pend_cbs(&rdp->cblist))
>> continue;
>> rnp = rdp->mynode;
>> raw_spin_lock_rcu_node(rnp); /* irqs already disabled. */
>> --
>> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
>> member of the Code Aurora Forum, hosted by The Linux Foundation
>>
--
QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a
member of the Code Aurora Forum, hosted by The Linux Foundation
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH] rcu: Fix up pending cbs check in rcu_prepare_for_idle Neeraj Upadhyay <neeraju@codeaurora.org> - 2017-08-07 08:00 +0200
Re: [PATCH] rcu: Fix up pending cbs check in rcu_prepare_for_idle "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-08-07 14:50 +0200
Re: [PATCH] rcu: Fix up pending cbs check in rcu_prepare_for_idle Neeraj Upadhyay <neeraju@codeaurora.org> - 2017-08-07 16:10 +0200
Re: [PATCH] rcu: Fix up pending cbs check in rcu_prepare_for_idle "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2017-08-07 16:20 +0200
csiph-web