From patchwork Wed Oct 19 22:46:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Paul E. McKenney" X-Patchwork-Id: 5886 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4ac7:0:0:0:0:0 with SMTP id y7csp570614wrs; Wed, 19 Oct 2022 15:48:25 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4+B7toHE2am+dtzMCefq13nA28gdd7nMj3OmY2bG49mssP5NWTFH/t1WyhtCwGKe6KGbun X-Received: by 2002:a05:6a00:1ace:b0:565:f52a:d998 with SMTP id f14-20020a056a001ace00b00565f52ad998mr10840844pfv.25.1666219705481; Wed, 19 Oct 2022 15:48:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666219705; cv=none; d=google.com; s=arc-20160816; b=rTrnxJsLKHBo7Rx42DlMH90hOsYPfSi41CcP4PdWSRqYEQoM2cgbS30s67kdx9WhUr MHMt880YZbLsOQY8eOoZp+MCIC8oyfWJYQ0Ii5ZtFJtF1rCBVXsa0dp0OaBiGGBQQR6F +8LklhEX9tdamsbLN+EGZzXEbNq8AD/phalkqb3s7ifW4Oy4SfSVbmZ98om4ba6NgTbD Y8F7HP6OBNlYqPQz7qNKWLqfG3fhCcDLALi5GEAPakWLgWo1aHH3Ks2r1P5YFRy6V9/q 965dXvE8ON+VVP2MRES1u37tOUpj+cOF5CUDHoAE1xs+cYWD4aaWOmuwEDfbi8EMqgAG P+xQ== 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=5f4RqyVJYIpaFfo+EpLDXcWlO0wdx/BfqGpkLlar3y8=; b=DR3lmv9J5nfpTW2nYQdvjjGCeX7RWx3xLzsDEzmyapjwtdJnO+9hm8p7rFHQpifOr3 aa5aExspdqs5yChbvoL3DW9HLTGQzsXkmrMVo+/S7P9FVZ5ILo75YiqSQnHQyCwRv4vW LA+AdbRZ85CucMRM1CKb/mYuq7YzvTi8eVFAn3RDrI+VD6ghaqCP1z0NPIMGLy92Q4lV f9XnjuqN4I/yr9sXm3WZiEogJVFOmlb863WwrX5vyAEN7JXJefq0GFQCnvGK7adMj8HC xegX2ChpV2/EDRkhiY4rmEBph/f2/0ItB8q7nk2PZZZmk6v1NZOsD01QE1fJjQ6uxFq0 e+OA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CATtEuYG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jl3-20020a170903134300b0017f77d19d92si18186081plb.127.2022.10.19.15.48.13; Wed, 19 Oct 2022 15:48:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CATtEuYG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S231147AbiJSWrU (ORCPT + 99 others); Wed, 19 Oct 2022 18:47:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230282AbiJSWrE (ORCPT ); Wed, 19 Oct 2022 18:47:04 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91E0317C167; Wed, 19 Oct 2022 15:47:03 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 514B7B8261A; Wed, 19 Oct 2022 22:47:02 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EB837C433B5; Wed, 19 Oct 2022 22:47:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1666219621; bh=XdRd/D7YtnjF/VbtVQdPblQxfOL6jWA9yUi4elYsgMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CATtEuYG11NQ97X+dUT5iqaZitwvMN1GjLxxebL7NPDD4dxFA0yPhlkM/csd1ceU0 5YpYWBZTlDcIDBhwd6d0OdN3MkPVI2tLW93lrNsg8w9aKtopPk/i42xNiXpnSQrikF 9opL8UGvgpS2dC64Wl4SQKHNG9djEdMGQzGo5+nqC2ZAE0qEe7BEwQ9bVoEDpM1P1I zqxyAoxz6PzHlS9NsFx7aMOnhGD5niqY5M1NnljreFhSr0HeZEDtpzzYi5U1llCaEK 2fsg1/4UBIGvOSBX7KbTKIxuiO9jPari1IRNCcENz39AozIrPniJi6mGm6EzuGUpMZ pDSXKJwdKXczw== Received: by paulmck-ThinkPad-P17-Gen-1.home (Postfix, from userid 1000) id A93345C0890; Wed, 19 Oct 2022 15:47:00 -0700 (PDT) From: "Paul E. McKenney" To: rcu@vger.kernel.org Cc: linux-kernel@vger.kernel.org, kernel-team@fb.com, rostedt@goodmis.org, Zeng Heng , Mukesh Ojha , "Paul E . McKenney" Subject: [PATCH rcu 3/8] rcu: Remove unused 'cpu' in rcu_virt_note_context_switch() Date: Wed, 19 Oct 2022 15:46:54 -0700 Message-Id: <20221019224659.2499511-3-paulmck@kernel.org> X-Mailer: git-send-email 2.31.1.189.g2e36527f23 In-Reply-To: <20221019224652.GA2499358@paulmck-ThinkPad-P17-Gen-1> References: <20221019224652.GA2499358@paulmck-ThinkPad-P17-Gen-1> MIME-Version: 1.0 X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747157994045787874?= X-GMAIL-MSGID: =?utf-8?q?1747157994045787874?= From: Zeng Heng This commit removes the unused function argument 'cpu'. This does not change functionality, but might save a cycle or two. Signed-off-by: Zeng Heng Acked-by: Mukesh Ojha Signed-off-by: Paul E. McKenney --- include/linux/kvm_host.h | 2 +- include/linux/rcutiny.h | 2 +- include/linux/rcutree.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 32f259fa58013..381b92d146c71 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -416,7 +416,7 @@ static __always_inline void guest_context_enter_irqoff(void) */ if (!context_tracking_guest_enter()) { instrumentation_begin(); - rcu_virt_note_context_switch(smp_processor_id()); + rcu_virt_note_context_switch(); instrumentation_end(); } } diff --git a/include/linux/rcutiny.h b/include/linux/rcutiny.h index 768196a5f39d6..9bc025aa79a30 100644 --- a/include/linux/rcutiny.h +++ b/include/linux/rcutiny.h @@ -142,7 +142,7 @@ static inline int rcu_needs_cpu(void) * Take advantage of the fact that there is only one CPU, which * allows us to ignore virtualization-based context switches. */ -static inline void rcu_virt_note_context_switch(int cpu) { } +static inline void rcu_virt_note_context_switch(void) { } static inline void rcu_cpu_stall_reset(void) { } static inline int rcu_jiffies_till_stall_check(void) { return 21 * HZ; } static inline void rcu_irq_exit_check_preempt(void) { } diff --git a/include/linux/rcutree.h b/include/linux/rcutree.h index 5efb51486e8af..70795386b9ffa 100644 --- a/include/linux/rcutree.h +++ b/include/linux/rcutree.h @@ -27,7 +27,7 @@ void rcu_cpu_stall_reset(void); * wrapper around rcu_note_context_switch(), which allows TINY_RCU * to save a few bytes. The caller must have disabled interrupts. */ -static inline void rcu_virt_note_context_switch(int cpu) +static inline void rcu_virt_note_context_switch(void) { rcu_note_context_switch(false); }