Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp1024863pxb; Wed, 29 Sep 2021 15:12:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyWwpytSXjRmXMXIApzQHQMNuNtAOdkDKZ0sB4YG3VyozkphkpQgzaURDjoEs8S2aaSQd6E X-Received: by 2002:a62:6383:0:b0:447:7fc:3eee with SMTP id x125-20020a626383000000b0044707fc3eeemr2112836pfb.86.1632953529343; Wed, 29 Sep 2021 15:12:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632953529; cv=none; d=google.com; s=arc-20160816; b=pvof8p54iTFdeIsHyJXc2cga8AhU4GYIhXLwpf6OGpeLFg6DYOQv1BT4qQ6bjdouCt W3QsAunFB5yoY0V/cHso8HYY6Pmt+BRfBfwOTxh/sjfJgdJs0bhWQGdRk6a9J5n3sDt/ THzp3NExp4tgiTM9YV7usKOZGeSPMmdhaYomYoSdSQ37RMU6JRrGCYGixvFcEgbonZrz 4gjcNCivGJqolTjAlWGjuv3empXzKcKIgawNvewR2Y75RynKB6n8XeYSeaupsyvw30p2 0SA+VhIUJhqHiOVrN9/FM4gTWtmuZJcv+nMzzLXSLjsZ36TFKh7a4My4W1jgUGp63trK q0XQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/Twn6/9hfCiMQ44DF4zup53HK3JYPmyoO/F80yDg0KQ=; b=gGUtELpgRU8FAbhWqcoFyYoOtayPTP2c8SVKA9TojThy16E6eT6wgK9kvlYfLhEKtF 1zUpXhDMYIX4h5aouB24t4uZcB61KWN2Ex2PWSVUvpNUM+DXDelzoK7AEeWzHhrqKZcW H4RPjJA2tBfqKSXvRe6bZeSMGLyx5kEuCpofaMc8/3I/NpWoFFW5tLpXr+eA+uVehj0v l/ZB6dgtwmWtW7CVQ/WOw2kK0s9W2yzIuw0VrWfE9OU5ox3iCT0npnSiPkVOUcN0BGsd jaGQbJnQ8y5VBOvIOdg38kDIMwpB+YOvV8gP0SgHAlEq/cBHC8neUNwatgMEZgDUAfMI 5gEw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BeNNNT/J"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s5si1418131plq.291.2021.09.29.15.11.53; Wed, 29 Sep 2021 15:12:09 -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; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="BeNNNT/J"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347219AbhI2WMW (ORCPT + 99 others); Wed, 29 Sep 2021 18:12:22 -0400 Received: from mail.kernel.org ([198.145.29.99]:60916 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1347206AbhI2WMT (ORCPT ); Wed, 29 Sep 2021 18:12:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D34276142A; Wed, 29 Sep 2021 22:10:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1632953438; bh=NpWASncjnZvaQzKCsA4GIJ7sPEOD6tKMBIZnvj8DI4s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=BeNNNT/J92Amxy6cs9QBytFbKL/H9muPYNEaw/ZMwdOJ8z5Tb193+EASaxh6z3tKh FUO3/f7HIxdAjXvDP/MWSl730l4zChO7HkgACcwd6WBiKaLon0y++FnhHSJRPlYpzR Urgq1b32Ud66HStAsBaaS63ZQ7PPyf9lSI6hLIgPfHHQMnSW7vzs2+UxeprtGIO7JH y1LF3bS/2fnFweXPwjTk4QOCg9jQfrLQe+6zc4wr9IEc1NepcItvQXHy8mmvb014U+ g99dkXDMaqMo3XI80vF5ar4e0WYxwOo1utpDBs6bS/n8ayHEtY3C8zlDMABSmPacgS 8QZMha/tXCZIA== From: Frederic Weisbecker To: "Paul E . McKenney" Cc: LKML , Frederic Weisbecker , Sebastian Andrzej Siewior , Peter Zijlstra , Uladzislau Rezki , Valentin Schneider , Thomas Gleixner , Boqun Feng , Neeraj Upadhyay , Josh Triplett , Joel Fernandes , rcu@vger.kernel.org Subject: [PATCH 07/11] rcu/nocb: Use appropriate rcu_nocb_lock_irqsave() Date: Thu, 30 Sep 2021 00:10:08 +0200 Message-Id: <20210929221012.228270-8-frederic@kernel.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210929221012.228270-1-frederic@kernel.org> References: <20210929221012.228270-1-frederic@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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) * 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); @@ -2556,8 +2555,7 @@ static void rcu_do_batch(struct rcu_data *rdp) } } - local_irq_save(flags); - rcu_nocb_lock(rdp); + rcu_nocb_lock_irqsave(rdp, flags); rdp->n_cbs_invoked += count; trace_rcu_batch_end(rcu_state.name, count, !!rcl.head, need_resched(), is_idle_task(current), rcu_is_callbacks_kthread()); -- 2.25.1