Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp947495ybz; Fri, 1 May 2020 11:26:58 -0700 (PDT) X-Google-Smtp-Source: APiQypJCqtPfmkUZBTvLvJDnbHh+082b+L6eVAXt3CAxKTJFv/zjRkqs86wyRcQmiCUr2SIKDtCP X-Received: by 2002:a05:6402:558:: with SMTP id i24mr4477721edx.347.1588357618492; Fri, 01 May 2020 11:26:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588357618; cv=none; d=google.com; s=arc-20160816; b=eFhIZWHOuw6386ARpQ35VQUUN/VTuP5Rk8yyHex0IPAWtEhqvFelRVf+L8tnH4r9HE XbjXgr2VLnnmRk5ROXLfZ7vy0dS9x88tlMCnkpFRTX2xSGyd2aim6AIPnOsLHgxdDefw fnOFZqdIsWUinnzgj+1R3U/JIvqN/O4MLpgFWI9VAdHWijc5hogr9jfKKYZ8bjjVoWuo qR514dFP7NxvUlwSFGeUw6yFd3bW1eLdLgfGe3jShsg2xMTSSGRWmSaGTiTF7WDh6rMT EqQeLuGY1K5eb3fVMyNQU/QJmii/JqpIh4MqsRfs6Ihf8pFtoVtre/4qhZwlAX3B+Kbz GmfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :robot-unsubscribe:robot-id:message-id:mime-version:references :in-reply-to:cc:subject:to:reply-to:from:date; bh=EhvoBWiWjhnO+r+wBNZCwNRqfo+WzL3jH2GnlhmDTh8=; b=i3GTa6eP3StZ/AFCaINj+R+c4q4sxhqY/U5OseApTjnc/czP1EsMpOTWc3qGNVTkBA uE4R7dKKBJutSC000pijsdlOr5ZXMx7TOv7wd4V4F6Se02V+Ucr94vL+yq7pEskrFxMg Dv0kpHsk8zHV0E1BVNPV3Fm48hS6QZMFU2jJyoT2bnhie6w6/nlWbKCkuMrhQzecWsNr 2YJJp2JVXBk7W7Hq/eY6R2zoBwxfT9aGMCGN6GK20CDnhf8h/bzaTdJR4MtjfYhOlO12 WnFsTsBZqqU5saCLaWY1JQyp5PEGLxFJvoRXbi8V6y1P0s5uIeVyHqtN6V7PQy2US8hx gmPQ== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q25si2403045ejb.274.2020.05.01.11.26.35; Fri, 01 May 2020 11:26: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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729975AbgEASWO (ORCPT + 99 others); Fri, 1 May 2020 14:22:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40308 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1730460AbgEASWM (ORCPT ); Fri, 1 May 2020 14:22:12 -0400 Received: from Galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 722A1C08E859; Fri, 1 May 2020 11:22:12 -0700 (PDT) Received: from [5.158.153.53] (helo=tip-bot2.lab.linutronix.de) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1jUaIa-0003X6-73; Fri, 01 May 2020 20:22:08 +0200 Received: from [127.0.1.1] (localhost [IPv6:::1]) by tip-bot2.lab.linutronix.de (Postfix) with ESMTP id AD8C21C0085; Fri, 1 May 2020 20:22:07 +0200 (CEST) Date: Fri, 01 May 2020 18:22:07 -0000 From: "tip-bot2 for Muchun Song" Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/fair: Use __this_cpu_read() in wake_wide() Cc: Muchun Song , "Peter Zijlstra (Intel)" , x86 , LKML In-Reply-To: <20200421144123.33580-1-songmuchun@bytedance.com> References: <20200421144123.33580-1-songmuchun@bytedance.com> MIME-Version: 1.0 Message-ID: <158835732766.8414.17788678090839078001.tip-bot2@tip-bot2> X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Linutronix-Spam-Score: -1.0 X-Linutronix-Spam-Level: - X-Linutronix-Spam-Status: No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,SHORTCIRCUIT=-0.0001 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The following commit has been merged into the sched/core branch of tip: Commit-ID: 17c891ab349138e8d8a59ca2700f42ce8af96f4e Gitweb: https://git.kernel.org/tip/17c891ab349138e8d8a59ca2700f42ce8af96f4e Author: Muchun Song AuthorDate: Tue, 21 Apr 2020 22:41:23 +08:00 Committer: Peter Zijlstra CommitterDate: Thu, 30 Apr 2020 20:14:41 +02:00 sched/fair: Use __this_cpu_read() in wake_wide() The code is executed with preemption(and interrupts) disabled, so it's safe to use __this_cpu_write(). Signed-off-by: Muchun Song Signed-off-by: Peter Zijlstra (Intel) Link: https://lkml.kernel.org/r/20200421144123.33580-1-songmuchun@bytedance.com --- kernel/sched/fair.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index cd7fd7e..46b7bd4 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -5718,7 +5718,7 @@ static int wake_wide(struct task_struct *p) { unsigned int master = current->wakee_flips; unsigned int slave = p->wakee_flips; - int factor = this_cpu_read(sd_llc_size); + int factor = __this_cpu_read(sd_llc_size); if (master < slave) swap(master, slave);