From patchwork Mon Jan 29 23:56:41 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boqun Feng X-Patchwork-Id: 193748 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2087:b0:106:209c:c626 with SMTP id gs7csp901128dyb; Mon, 29 Jan 2024 16:00:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3cpD7OOaHQtBQiJc2dqzgXXtkjEkSUn9YC/mpVJgZe7ADaF1BOVBbcRzAlW3tbHZPySmR X-Received: by 2002:a05:620a:44c2:b0:784:5c9:ba48 with SMTP id y2-20020a05620a44c200b0078405c9ba48mr2317671qkp.65.1706572832886; Mon, 29 Jan 2024 16:00:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706572832; cv=pass; d=google.com; s=arc-20160816; b=VpdCWuZZMs9IP094YZlOe1lgYX91Oz2XW+ZVtLiWsVHUYoFhQ5f2NSgf7saVBZjACK rBlNkVl+PZUlpM3jMav5amRTrQn4i7mf5GoT6jqf3zH3AQs81rJC7OerejXtvO1dGgPd fH+fBmSj3/lLLPF4ew64qRM35WNyJvzGwDim70tVnYViPaLFZM9sCQ+McU7ZnS4BXoOl srmKhEXeA5b3Ltc5XQS4R8HHqzbHaNL8+XTvQ2MkUT3+j34wKhC8k1PgRIutkn5F9u8O 0XG/3zd4zjT4xpY25O2+YzZwc0i0oly0MDeDg/RUV/SvpN/242/25V5n6kifRQpmkh2Z D1RQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:feedback-id:dkim-signature; bh=RSP3l2uIllosU/0jzT2mQWw4itLcaXh88Ph87j6nkH4=; fh=Ha5yDS3GIZmG0qmZaEo3lMXRsZS0ydClGHABk+/XNIc=; b=y3/KgrUejYBHekOX7yHrfX/esD7aRCsbiQBacIL27sF2fUerlkxV1oRZyj431aECtn 2CDMPOPv3L61xxuHSuk/6AkkIppaqFOJEtUzGKCchCjkQIvcD1VnlvhC0AnuFxom8SQy pov+tsMneqhBBxV8awfsuiO3v78a4Mo5435fbraCeYEpMt++iDEVzXdIMN81gbhflP14 VaJo6bKIG0ZjrJOTbUQkfKYpMiLft76hChfaBYMgOKyTd/zCNqCMyjEwrneH1hk1YJRM SO2rV51sFABLCp8tyk0p6f+dHnzEGvFR5p6SMl32VuKDFgqThCOO4iNYu5cJe48WAUzJ pDhw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WKJfthmU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-43654-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43654-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id p25-20020a05620a113900b00783de628217si7759464qkk.121.2024.01.29.16.00.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 16:00:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43654-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=WKJfthmU; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-43654-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43654-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 6AFD01C21746 for ; Tue, 30 Jan 2024 00:00:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DC32515B2E7; Mon, 29 Jan 2024 23:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="WKJfthmU" Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D489515B0E4; Mon, 29 Jan 2024 23:58:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706572688; cv=none; b=unMUPPzaWNs8mK8yVCH5knHzt+bCpqAjsh+OsVzrwtB2bKeFrfjnr2ta695Zhj8VHS53Wpg9gPNgDzT8viUUI7pgOB9tDShzp97X+W1huezlfobjV6CJwMoDL+AR+k0Xbfik4x+8UE72oDHA/jjAgCW8XVv/BxkW7FGbhleaULY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706572688; c=relaxed/simple; bh=lMFvgqfN+kt6RoJPWB4o6w/nLUSSKF34aDlk2aqz1Qg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WTTf3S2it5+7JwsCS4leOmbOZMmopdpN/ic4A2NsfOn7tW7ePxxPFISR99hAECk2A8vMIG/2oJKhugWPX4WbsSaqXlKamnd3MTaPc5mT8D5vnwQyKynSItTMHbzJY6llBSmYmDOFMnmfvmR6hOApTpiL5unvPfO9AbzG/b0sSBw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=WKJfthmU; arc=none smtp.client-ip=209.85.219.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-qv1-f53.google.com with SMTP id 6a1803df08f44-68c420bf6e1so17031596d6.2; Mon, 29 Jan 2024 15:58:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1706572686; x=1707177486; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:from:to:cc:subject :date:message-id:reply-to; bh=RSP3l2uIllosU/0jzT2mQWw4itLcaXh88Ph87j6nkH4=; b=WKJfthmUUy0jAde6bFnD9HEjgv8O4SjFeBEnX7g7Yh0TlHuhpeQJS7tw+fkweTQdZD P8uSXGneOhrVfaLbLx6aGB9zODfGSAUI00/dMilRrqdeUvkuryX9Rt/BZyq0t9XCmG9H aDTXbBHecIkbwdJ+zr5/C9SntPj+f0UYBdFKg3j6dzdil029TC7W4uNKwXDoZAUybSln f8/Y4X7xzIMlYC5974bGppgmqxzTSXQV2N7VgZwISvPuioMDldae1xWwgT99+5q0QEi4 MQwL4EAt58ClTVkpH2m6IIAAA7YlttpmBMwbvnZ1d5Ss0yQ63xikheXaRZWCqkN5hdTT hP6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706572686; x=1707177486; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:feedback-id:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RSP3l2uIllosU/0jzT2mQWw4itLcaXh88Ph87j6nkH4=; b=bDkHCH0lY5qhUzse747n2PtLEWpmCE6FGbxqjDxKD4xEzaXPbmT5ohwukUvn4n13Gk EtStrW+aCEcUT8YrrAUfrCwoGHlwyEUJJWRVz1GBG8dIGslQIhogLkHwJXFGSfxMDd7y Db4hQ2+UBLj1B3oOqEXPTwRhRiEW82O4awJIRFjEXLHIHdmh8qKQg93lyhvVRvBwvtqX iFFfK3lcfgPTDaW8EzOKZaeoKO30qtIyl4J7/Jhqum+PwpoW6C5Zo8P+TukEosceJvef EzvE49MZ8tLfK+dercTtZd5LL16+Ew2jJfVrI0ZvoPfF8SRSFPkDw09lt5Vk4IbYuiLr lSRQ== X-Gm-Message-State: AOJu0YyGL4b+E5CGU1JDIne9NBe61HN4fOWxJ5UR/G6EX26ZWzGlWqG5 n/3lIf+D5M/8tqVR3CryLXkeLKU5ckmA8gSTijeVmGyxLomQLK3C X-Received: by 2002:a05:6214:5192:b0:685:236a:c883 with SMTP id kl18-20020a056214519200b00685236ac883mr9677524qvb.22.1706572685729; Mon, 29 Jan 2024 15:58:05 -0800 (PST) X-Forwarded-Encrypted: i=0; AJvYcCVCZnQf4jnUV5WAP2NM4CT2f7zfQ6iez/tfhcsZZs3SfBv7QfrF19bXB9OIiwrIltFpK/zRzBSrNmP+bMRfwg/oClS1e+jvf0GZIIuvNh2PvKwogO6S2eRUswbFB3YfQKreYhRBtWcdpHyGBDmdCSUVekQjCk9sNslTWwGD0gMU1SG4r9N6+Wmjhqf/F6on5pbO8BPgX/A3N/8fJ9OksxsuP2HuHRklmkssbdtx7Ih9OQS0rLhoxvLqEroDyp9wA1BMdiPGGFdI42mWn6R9EDgQkd0k+bAzjJZOUW9Sm81G+VsbAy5XWzs4BDagOUcCd/b0j+B5j6pMVMBDuD1e74oFReKQv/Uqon6x3YnRO5UWiUi2dKqi+3DtcLgyc0HnSGTAa7jHmC0blO1gWofz6SOEH2UP8Tt0E5V0MzJR0eeFljxB81ShUYp79qOBSHaK/moiD+85lBqXTO9lUlvnTNlVR4/KYNKcsMcfZOo= Received: from fauth2-smtp.messagingengine.com (fauth2-smtp.messagingengine.com. [103.168.172.201]) by smtp.gmail.com with ESMTPSA id op32-20020a05621445a000b0068c4917df76sm1979142qvb.130.2024.01.29.15.58.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 15:58:05 -0800 (PST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailfauth.nyi.internal (Postfix) with ESMTP id ECBE21200043; Mon, 29 Jan 2024 18:58:04 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 29 Jan 2024 18:58:04 -0500 X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrfedthedgudejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepuehoqhhu nhcuhfgvnhhguceosghoqhhunhdrfhgvnhhgsehgmhgrihhlrdgtohhmqeenucggtffrrg htthgvrhhnpefghfffvefhhfdvgfejgfekvdelgfekgeevueehlefhiedvgeffjefgteeu gfehieenucffohhmrghinhepkhgvrhhnvghlrdhorhhgnecuvehluhhsthgvrhfuihiivg eptdenucfrrghrrghmpehmrghilhhfrhhomhepsghoqhhunhdomhgvshhmthhprghuthhh phgvrhhsohhnrghlihhthidqieelvdeghedtieegqddujeejkeehheehvddqsghoqhhunh drfhgvnhhgpeepghhmrghilhdrtghomhesfhhigihmvgdrnhgrmhgv X-ME-Proxy: Feedback-ID: iad51458e:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 29 Jan 2024 18:58:04 -0500 (EST) From: Boqun Feng To: linux-kernel@vger.kernel.org, rcu@vger.kernel.org Cc: Onkarnath , Maninder Singh , Oleg Nesterov , Tejun Heo , "Paul E . McKenney" , Frederic Weisbecker , Neeraj Upadhyay , Joel Fernandes , Josh Triplett , Boqun Feng , Steven Rostedt , Mathieu Desnoyers , Lai Jiangshan , Zqiang Subject: [PATCH 8/8] rcu/sync: remove un-used rcu_sync_enter_start function Date: Mon, 29 Jan 2024 15:56:41 -0800 Message-ID: <20240129235646.3171983-9-boqun.feng@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240129235646.3171983-1-boqun.feng@gmail.com> References: <20240129235646.3171983-1-boqun.feng@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1789471314857254075 X-GMAIL-MSGID: 1789471314857254075 From: Onkarnath With commit '6a010a49b63a ("cgroup: Make !percpu threadgroup_rwsem operations optional")' usage of rcu_sync_enter_start is removed. So this function can also be removed. In the words of Oleg Nesterov: __rcu_sync_enter(wait => false) is a better alternative if someone needs rcu_sync_enter_start() again. Link: https://lore.kernel.org/all/20220725121208.GB28662@redhat.com/ Signed-off-by: Onkarnath Signed-off-by: Maninder Singh Acked-by: Oleg Nesterov Acked-by: Tejun Heo Signed-off-by: Paul E. McKenney --- include/linux/rcu_sync.h | 1 - kernel/rcu/sync.c | 16 ---------------- 2 files changed, 17 deletions(-) diff --git a/include/linux/rcu_sync.h b/include/linux/rcu_sync.h index 0027d4c8087c..3860dbb9107a 100644 --- a/include/linux/rcu_sync.h +++ b/include/linux/rcu_sync.h @@ -37,7 +37,6 @@ static inline bool rcu_sync_is_idle(struct rcu_sync *rsp) } extern void rcu_sync_init(struct rcu_sync *); -extern void rcu_sync_enter_start(struct rcu_sync *); extern void rcu_sync_enter(struct rcu_sync *); extern void rcu_sync_exit(struct rcu_sync *); extern void rcu_sync_dtor(struct rcu_sync *); diff --git a/kernel/rcu/sync.c b/kernel/rcu/sync.c index e550f97779b8..86df878a2fee 100644 --- a/kernel/rcu/sync.c +++ b/kernel/rcu/sync.c @@ -24,22 +24,6 @@ void rcu_sync_init(struct rcu_sync *rsp) init_waitqueue_head(&rsp->gp_wait); } -/** - * rcu_sync_enter_start - Force readers onto slow path for multiple updates - * @rsp: Pointer to rcu_sync structure to use for synchronization - * - * Must be called after rcu_sync_init() and before first use. - * - * Ensures rcu_sync_is_idle() returns false and rcu_sync_{enter,exit}() - * pairs turn into NO-OPs. - */ -void rcu_sync_enter_start(struct rcu_sync *rsp) -{ - rsp->gp_count++; - rsp->gp_state = GP_PASSED; -} - - static void rcu_sync_func(struct rcu_head *rhp); static void rcu_sync_call(struct rcu_sync *rsp)