From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752521AbdJ0M0K (ORCPT ); Fri, 27 Oct 2017 08:26:10 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:46024 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752190AbdJ0M0H (ORCPT ); Fri, 27 Oct 2017 08:26:07 -0400 Date: Fri, 27 Oct 2017 05:26:01 -0700 From: "Paul E. McKenney" To: Neeraj Upadhyay Cc: josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com, LKML Subject: Re: Query regarding srcu_funnel_exp_start() Reply-To: paulmck@linux.vnet.ibm.com References: <481c3c8d-2385-2e38-dfe6-0cb9b6855b8a@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <481c3c8d-2385-2e38-dfe6-0cb9b6855b8a@codeaurora.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-GCONF: 00 x-cbid: 17102712-2213-0000-0000-000002325B4B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00007961; HX=3.00000241; KW=3.00000007; PH=3.00000004; SC=3.00000239; SDB=6.00937199; UDB=6.00472344; IPR=6.00717462; BA=6.00005660; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00017742; XFM=3.00000015; UTC=2017-10-27 12:26:04 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17102712-2214-0000-0000-000057FB9E7C Message-Id: <20171027122601.GJ3659@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-10-27_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1710270166 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 27, 2017 at 02:23:07PM +0530, Neeraj Upadhyay wrote: > Hi, > > One query regarding srcu_funnel_exp_start() function in > kernel/rcu/srcutree.c. > > static void srcu_funnel_exp_start(struct srcu_struct *sp, struct > srcu_node *snp, > unsigned long s) > { > > if (!ULONG_CMP_LT(sp->srcu_gp_seq_needed_exp, s)) > sp->srcu_gp_seq_needed_exp = s; > > } > > Why is sp->srcu_gp_seq_needed_exp set to 's' if srcu_gp_seq_needed_exp is >= > 's'. Shouldn't srcu_gp_seq_needed_exp be equal to the greater of both? Let's suppose that it is incorrect as currently written. Can you construct a test case demonstrating a failure of some sort, then provide a fix? To start with, if it is currently incorrect, what would be the nature of the failure? Thanx, Paul