Received: by 2002:a05:6a10:d5a5:0:0:0:0 with SMTP id gn37csp1454365pxb; Fri, 1 Oct 2021 10:55:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzogpA5h4FTxG5f4ypDHSUuBRrdNVwMtHwlhqIm61Mua6FMRMNaJIQQG79FepvA/xiYdjFd X-Received: by 2002:a05:6402:5206:: with SMTP id s6mr16139731edd.135.1633110958123; Fri, 01 Oct 2021 10:55:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1633110958; cv=none; d=google.com; s=arc-20160816; b=bZF1Pu28MMImDsnf/uNup9zBNV/3jE2bHpwsQbUCCHKBURWB0/BA0daTXrRRlMaK+t EdoLbZyKXmskizCEh+7HLq114tIaERL24znLzidQVRqq/W5m2f1ndTJLv1FfVh0+rZpB paqj2vkN5DY+3TroLaaHe5EXr3Zs6+qP/IohqN1ouFS/RfVsWS4F/xxZZ1wpVj4JUvdA E+s3b0wgX+0FzP9IBtuCoeuF/5EKiZ4Oq5HBZV/uPkMpy9oKm2ULoMDQoVWeEEahfEva jswREiM/EWxXTCxZ4/ToKbCn1KLipyrU0XP0z43aICgz4V7GOddHqyyraFKD6R04ddz+ B/yQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from; bh=jfrVsLISWm+UGknyvDFNddI0+Ox+0cy052YeIS/KZpY=; b=Y31t1fvtaGgxZPgf4+CeeyY1H3U8Rv0k4JZ2/oK2YCCqISaxdbf+574d3S6YQgWIWQ cIN6YC6fAOEzG12hz/HLB/RIME2FLLccpfPyL9EBeHFTcYRsYZWT27TnR3bjwF107V0T yoUuudOlPDaedQoEjQid2/r1blYQkp2uKWpQfmg7o2/Y2iairD5tV+Z2I2rW9lGzki7S Zzf2ajtHYGWnrfnpMTzVan+Rf6epVZywSL8rvHSiEfbmucxFOV0rmrpUOcZffeb08Tug InyXgCrlbO/Al0jQicu8yw11xa30t0a48R3QyjIutlef3tNyWahs3F6O+x2A2QlACqnz HtnA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id m4si7807501edj.623.2021.10.01.10.55.33; Fri, 01 Oct 2021 10:55:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355473AbhJARwo (ORCPT + 99 others); Fri, 1 Oct 2021 13:52:44 -0400 Received: from foss.arm.com ([217.140.110.172]:49486 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355237AbhJARwn (ORCPT ); Fri, 1 Oct 2021 13:52:43 -0400 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 40986106F; Fri, 1 Oct 2021 10:50:59 -0700 (PDT) Received: from e113632-lin (usa-sjc-imap-foss1.foss.arm.com [10.121.207.14]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 942EC3F70D; Fri, 1 Oct 2021 10:50:57 -0700 (PDT) From: Valentin Schneider To: Frederic Weisbecker , "Paul E . McKenney" Cc: LKML , Frederic Weisbecker , Sebastian Andrzej Siewior , Peter Zijlstra , Uladzislau Rezki , Thomas Gleixner , Boqun Feng , Neeraj Upadhyay , Josh Triplett , Joel Fernandes , rcu@vger.kernel.org Subject: Re: [PATCH 07/11] rcu/nocb: Use appropriate rcu_nocb_lock_irqsave() In-Reply-To: <20210929221012.228270-8-frederic@kernel.org> References: <20210929221012.228270-1-frederic@kernel.org> <20210929221012.228270-8-frederic@kernel.org> Date: Fri, 01 Oct 2021 18:50:55 +0100 Message-ID: <878rzcmy68.mognet@arm.com> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 30/09/21 00:10, Frederic Weisbecker wrote: > Instead of hardcoding IRQ save and nocb lock, use the consolidated > API. > > Signed-off-by: Frederic Weisbecker > Cc: Valentin Schneider > Cc: Peter Zijlstra > Cc: Sebastian Andrzej Siewior > Cc: Josh Triplett > Cc: Joel Fernandes > Cc: Boqun Feng > Cc: Neeraj Upadhyay > Cc: Uladzislau Rezki > Cc: Thomas Gleixner Just one comment nit below. Reviewed-by: Valentin Schneider > --- > kernel/rcu/tree.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c > index b1fc6e498d90..1971a4e15e96 100644 > --- a/kernel/rcu/tree.c > +++ b/kernel/rcu/tree.c > @@ -2492,8 +2492,7 @@ static void rcu_do_batch(struct rcu_data *rdp) While at it: - * Extract the list of ready callbacks, disabling to prevent +- * Extract the list of ready callbacks, disabling IRQs to prevent > * races with call_rcu() from interrupt handlers. Leave the > * callback counts, as rcu_barrier() needs to be conservative. > */ > - local_irq_save(flags); > - rcu_nocb_lock(rdp); > + rcu_nocb_lock_irqsave(rdp, flags); > WARN_ON_ONCE(cpu_is_offline(smp_processor_id())); > pending = rcu_segcblist_n_cbs(&rdp->cblist); > div = READ_ONCE(rcu_divisor);