Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp1053440pxv; Thu, 22 Jul 2021 21:01:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzB/k6izQMuJrDNvsseaMoZ7E8BzcTqQbAmEVnTatcXEJpHOkyg2KwpWOIRH0BnzZN9uTyp X-Received: by 2002:aa7:cb56:: with SMTP id w22mr3448724edt.234.1627012889058; Thu, 22 Jul 2021 21:01:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627012889; cv=none; d=google.com; s=arc-20160816; b=AbctUF/qs+9Sce8lwcqb6n2Xn1X66cOHccAPkRIziBCA1WgYC2ve+tKsCFw9IM4lZr kFg+ZrvutZEvh4M0q5HTW2k2nF1RHyTbfEPIhxxjn7osfueucNdncgFZCgxQ015K4ltp /PRuAWaI7x2yuH8i4c8FnCGxixp2yNKaz3hRGCW9Lj5uyHeBrMYRGYsOUu71BB3A2UGQ kiTqqXJzlalfVSApFLuGCLboCCilgJ9v+R64z/EX5zEwP7lMyxptvl4mvEqWV+GzVzzG sGZJceo4ATrT5+FWtI5t3G3cUgTGzPggtBY+idudrWgQRHORof2c10CWvM0prC9PNOlY 5i7A== 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=lus4HAfL6RxSWV5T1QAA1133FTMxeBWwpSBeT370YjM=; b=qCEm/iAFBznGuLYPHsp1LhI7+vbkJpirAQO4D+/8erVOspKdcdku3m3PnCtR7dkX1z oyYhG+3gfi3/DhWSX8EPoB1893QHNn4D8N+8J3dzsw815IhZE9oCIkkA5nemweP5h8k/ 09Q7YwNnF2jmdoT1r/czuq/hBUCBV6+HO1cJ0AmU1cBV03gqrL2PLi06o7Ng2tL2HfbD o1wUwX99ARtAkEOBgJVJTBNhnRlQ6dTIZQhNigwJmQ8ULxb8HfO9BbN1Otd3hXxFuUiK i9gP/gHrAXLMHVpqNc2CE/vNvWbaTNMd9GQnz2mbfTVxJxt9eEywklycoC0g91BjkqgF Rssw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=l25YwnaE; 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 g23si31106998ejw.663.2021.07.22.21.01.05; Thu, 22 Jul 2021 21:01:29 -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=l25YwnaE; 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 S233745AbhGWDRB (ORCPT + 99 others); Thu, 22 Jul 2021 23:17:01 -0400 Received: from mail.kernel.org ([198.145.29.99]:37014 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233637AbhGWDQz (ORCPT ); Thu, 22 Jul 2021 23:16:55 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CA42F60ED4; Fri, 23 Jul 2021 03:57:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1627012649; bh=0fFSBGjMqGrHX5bYIH3e3/ZNEowMOG8J3Zb33Re8/po=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=l25YwnaECFPTXBWD0kgmWeuu/F/0AoASjnCmskxBuD/kyEinnE6F9eLFUCg8UtVjN aCRPMKlhY2bC9aAJ5ddSib6Ag9/ObKw8wXcCI7VtpDOw62N5/BACSJOtuuykpryHCw besb2ynlXGKIxhBPyKhuh83fAjm8bzquy44JmNSMcF1JKYNksONU3PKnwsw2CXaF/4 bsPy070ZV/Vek/1JSxCOgg22kv/eDWx+1mImvJwIuSfi8CoaavTgxePSEihJiCQcfr BmxIuM3c3Wa9etztcc/nYLUb0mmTjzkRN29fKWQ6RLZpA/WFP1azewJMWX4cpOx35K H2YQ8lMMZSGdw== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: "Paul E. McKenney" , "Xu, Yanfei" , Sasha Levin , rcu@vger.kernel.org Subject: [PATCH AUTOSEL 5.13 06/19] rcu-tasks: Don't delete holdouts within trc_wait_for_one_reader() Date: Thu, 22 Jul 2021 23:57:07 -0400 Message-Id: <20210723035721.531372-6-sashal@kernel.org> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20210723035721.531372-1-sashal@kernel.org> References: <20210723035721.531372-1-sashal@kernel.org> MIME-Version: 1.0 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: "Paul E. McKenney" [ Upstream commit a9ab9cce9367a2cc02a3c7eb57a004dc0b8f380d ] Invoking trc_del_holdout() from within trc_wait_for_one_reader() is only a performance optimization because the RCU Tasks Trace grace-period kthread will eventually do this within check_all_holdout_tasks_trace(). But it is not a particularly important performance optimization because it only applies to the grace-period kthread, of which there is but one. This commit therefore removes this invocation of trc_del_holdout() in favor of the one in check_all_holdout_tasks_trace() in the grace-period kthread. Reported-by: "Xu, Yanfei" Signed-off-by: Paul E. McKenney Signed-off-by: Sasha Levin --- kernel/rcu/tasks.h | 1 - 1 file changed, 1 deletion(-) diff --git a/kernel/rcu/tasks.h b/kernel/rcu/tasks.h index 71e9d625371a..fcef5f0c60b8 100644 --- a/kernel/rcu/tasks.h +++ b/kernel/rcu/tasks.h @@ -937,7 +937,6 @@ static void trc_wait_for_one_reader(struct task_struct *t, // The current task had better be in a quiescent state. if (t == current) { t->trc_reader_checked = true; - trc_del_holdout(t); WARN_ON_ONCE(t->trc_reader_nesting); return; } -- 2.30.2