Message ID | 20240229142248.392017685@linutronix.de |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-86831-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:2097:b0:108:e6aa:91d0 with SMTP id gs23csp434404dyb; Thu, 29 Feb 2024 06:29:39 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUEm3WocR5GZCosJ/lM2RqO1DBPhzO8EEFusEjG0NPX62J1NfmeVME7ZO2CVMRJ4AzCV02yNaLw4i+yd5BXV3SEM5FvZQ== X-Google-Smtp-Source: AGHT+IErw8wi0rYpciOTi3I5AJQEiYj1b8o6neqFefErnF2Z0bzmmPs2J+WtHqfkD+qeF6rEyOB9 X-Received: by 2002:a05:6a20:e68e:b0:19c:b0f6:25c with SMTP id mz14-20020a056a20e68e00b0019cb0f6025cmr2736010pzb.45.1709216979109; Thu, 29 Feb 2024 06:29:39 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709216979; cv=pass; d=google.com; s=arc-20160816; b=uqMsAmlNYoT1I9B2TtvGfn6PpMlO9+Cquj8phCtCpx2/VikwDGNyJmMAIj9pNo3b7/ mdEuDYnD7LMM4WYkSgfmz9+AgxsWFXn25gTIiTi6JYz/W+1qFjGn6ma/fTwu8kofU8Te XgFpMHJIXL5SMXzFzzWmDJcartO7GZgooJGMWn0hd7tx+M9+JZbWevuz0IaqxsT2Xq/Q 28lBIi5CuMWwFpInE1cm4uqf0C6/HJzUrg9fit2w0Z2RQKmXM29xUycOiN6R16g6auUM 54AfExlwbFcV2QLfbnIbEksbqKbrG3jggnVBbKIKTL2kxAWZAHp0Rw2DoSQ1T7F4bCJq 09yQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=date:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:subject:cc:to:from:dkim-signature :dkim-signature:message-id; bh=Atj5tI/wQAeX3+mHod6Chan4BMI8xFQMxbYKR6KaLnk=; fh=PG4pDnEpPgvD7rD3Usg/3IzySUyERYtwQcr+tbVLEzM=; b=emgxGTx5cLjvF/wQvZ5oEsg3cpqAiesAi4bWGhpTKCwgilDEkjvXIegM+9SQPuAF1F wMVUry2JvlKwB07zUlvELvY0AVj442cayELYojc6jqNdUXPuzHp+Z07/D5/mLwZ2fUsi 4WjGRB6boZkC1qI0NnZAb4PvgSSCQLyDbRdFOsSPs1eyK0WSq5T+nSYiLZf/mFVNnH1Q PWl/mEenAjhf+x6w/NL66eyd9fHWn2D2bRwkevhicR0rDB6f5d2Ter0YkQ4l3DvO4ykZ pyFPHYgsWsVjGXeQF0z8Ux0dxbIk1+9Mwxq+ajRjngqpCMDJ9uLTy3ELXGn0xfXR9tu8 djRg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="HW/R8PJP"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-86831-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86831-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id w30-20020a63161e000000b005dc6d159424si1508826pgl.235.2024.02.29.06.29.38 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 29 Feb 2024 06:29:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-86831-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="HW/R8PJP"; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; arc=pass (i=1 spf=pass spfdomain=linutronix.de dkim=pass dkdomain=linutronix.de dmarc=pass fromdomain=linutronix.de); spf=pass (google.com: domain of linux-kernel+bounces-86831-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-86831-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id D7022B238FE for <ouuuleilei@gmail.com>; Thu, 29 Feb 2024 14:24:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 077271384A8; Thu, 29 Feb 2024 14:23:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HW/R8PJP"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="vs+Vo4oz" Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DAF9012E1E3 for <linux-kernel@vger.kernel.org>; Thu, 29 Feb 2024 14:23:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=193.142.43.55 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709216623; cv=none; b=sYLMlEdSjLFVa+dY3XFnHEAYvAYPHdjOA8WSDAaOiF4oL+8M3KkmmWVPpMqs1W8qgHkQ09V4TWB9KgWBEQgsmCKCIMsDbsNzwKkvAJCQndwwEEAi11/Qom+x3AHMqDhjCUjbvNHciBWPHCn6M9lrBPkvSCc5w+dVtcQficvCtyk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709216623; c=relaxed/simple; bh=oeg0kEbXFXlw0/cW4ak9QngSFlXFHmiohtL35YQM4Yc=; h=Message-ID:From:To:Cc:Subject:References:MIME-Version: Content-Type:Date; b=VZrqUhDS5mu7TnuNX8qaLV5i0HHLgmLTKpr/ghmZi87Xs1wvZSVb7OdDATEQ6MIgMWG38mNfAP/7AsUgQz4Nd1ONXbD+8IKYn0trH6yqwsbacwSQNLfAuxbmyugYHH08xc4yDf6zVlv50nApEhQUng9fstLr13mno7QsQTRSrfM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de; spf=pass smtp.mailfrom=linutronix.de; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=HW/R8PJP; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=vs+Vo4oz; arc=none smtp.client-ip=193.142.43.55 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linutronix.de Message-ID: <20240229142248.392017685@linutronix.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1709216619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=Atj5tI/wQAeX3+mHod6Chan4BMI8xFQMxbYKR6KaLnk=; b=HW/R8PJPEVN3RwQ0leIB6iAt07gJng02l9rCWeR4jo39BtXeLQQ8KJGZeGICXLTTUJjHCY vvP0kE4z+DQ97CpvguN7nva0qiYDTRaOgWmPhifXtdgZKrB7rs5DbcqRldSBPHKupHupOc bSIon7eodjLO2ddH/L5CMZHn7fTpBZ/qAcdb8KWlqEYBVT4vxJCOZsA7cTVgpL3T9QvLHu v+L6RKc45ocjTnaK8Ff39+IX7T4L886KmsR+59DP9+3hqM0ztj20vzp4hTj4mC8EoAgZU+ /Hx6LG838jpgefRWXCX73i4HPC+qfz3ZBNn2HNlukCyZxwHSvq1dqqI8YnBUAw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1709216619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: references:references; bh=Atj5tI/wQAeX3+mHod6Chan4BMI8xFQMxbYKR6KaLnk=; b=vs+Vo4ozht/yHfoiPScLoNFWqBLtKWWIF8TccoZWL4gz0F60YU727MAndiTxw5BdRHtdWN BKG+JtB5jP17JXAw== From: Thomas Gleixner <tglx@linutronix.de> To: LKML <linux-kernel@vger.kernel.org> Cc: x86@kernel.org, Steven Rostedt <rostedt@goodmis.org>, "Paul E. McKenney" <paulmck@kernel.org> Subject: [patch 3/6] x86/idle: Clean up idle selection References: <20240229141407.283316443@linutronix.de> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Date: Thu, 29 Feb 2024 15:23:38 +0100 (CET) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1792243903191256035 X-GMAIL-MSGID: 1792243903191256035 |
Series |
x86/idle: Cure RCU violations and cleanups
|
|
Commit Message
Thomas Gleixner
Feb. 29, 2024, 2:23 p.m. UTC
Clean up the code to make it readable. No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/process.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
--- a/arch/x86/kernel/process.c +++ b/arch/x86/kernel/process.c @@ -910,11 +910,13 @@ static __cpuidle void mwait_idle(void) void select_idle_routine(const struct cpuinfo_x86 *c) { -#ifdef CONFIG_SMP - if (boot_option_idle_override == IDLE_POLL && smp_num_siblings > 1) - pr_warn_once("WARNING: polling idle and HT enabled, performance may degrade\n"); -#endif - if (x86_idle_set() || boot_option_idle_override == IDLE_POLL) + if (boot_option_idle_override == IDLE_POLL) { + if (IS_ENABLED(CONFIG_SMP) && smp_num_siblings > 1) + pr_warn_once("WARNING: polling idle and HT enabled, performance may degrade\n"); + return; + } + + if (x86_idle_set()) return; if (prefer_mwait_c1_over_halt(c)) {