From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752322AbdJ0IxS (ORCPT ); Fri, 27 Oct 2017 04:53:18 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:46912 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752207AbdJ0IxN (ORCPT ); Fri, 27 Oct 2017 04:53:13 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 440E46034E 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 To: paulmck@linux.vnet.ibm.com, josh@joshtriplett.org, rostedt@goodmis.org, mathieu.desnoyers@efficios.com, jiangshanlai@gmail.com Cc: LKML From: Neeraj Upadhyay Subject: Query regarding srcu_funnel_exp_start() Message-ID: <481c3c8d-2385-2e38-dfe6-0cb9b6855b8a@codeaurora.org> Date: Fri, 27 Oct 2017 14:23:07 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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? Thanks Neeraj -- QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, hosted by The Linux Foundation