Message ID | 20240112091916.696185-2-songshuaishuai@tinylab.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-24483-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:693c:2614:b0:101:6a76:bbe3 with SMTP id mm20csp58575dyc; Fri, 12 Jan 2024 01:31:03 -0800 (PST) X-Google-Smtp-Source: AGHT+IHNVES6ow6dMOKhW5T9YzrF5+HEsoWDgYJfyRZp9+v0vzAJT7pa7kPk9Mdk8crClRJlUg62 X-Received: by 2002:a05:6a00:1481:b0:6da:345f:6a63 with SMTP id v1-20020a056a00148100b006da345f6a63mr1039339pfu.5.1705051862755; Fri, 12 Jan 2024 01:31:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705051862; cv=none; d=google.com; s=arc-20160816; b=USnqqcEkw9XMVGJfmdnAYrOVc/Ti1XGF4eLbwqdVNEgHFT2/IaG7PVCxlbgz4j5evQ vsuuIu0QCHpssl5/kOYyLZOpmhiDjLzNOi7YCknUTMpJhvDF9mHiZWCkQZXTi54ACR0E 77/tZSFbZtjlupEu339lYCdiQAYM4EgE41+AgSeP/XCnt6h77Bkg73l8GB48l4/OSFny lmZ61VNZFSEjszrMx2LQFWHsZAyDMGA/9MF6QOQKRLgYiAXjHuo0eGiMKuWTEqzRqkXV O7LCO1RYpd1F+hpEN4VUTWqXCJY6czIzdBvmDhkStFp5R1UGM+0KxPA7/f1Y9ZAqtJwp xpDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=feedback-id:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=zyo3UjtVQ1Ut4hs4xeHVKf07MnKwFaPK15nzAfJktps=; fh=5tHs3hHbsJ5gDTLfSS9yWgRV0uvge6Ckr+rVTDgdads=; b=xlDDbKNC0D/elz3/8Pg7bzOZQ4ttIm7BB9QhwgPgCMNgPa8qwaxn1u/ty2VKGaMJEc 4BLPIUr0KYeCn/ort7tQEQakfqXy53cEBv+Y6PjAnBcdRVwmG2ddZcH7XZXVYuPOGwwn CoBarqldB8YvhsnkjHKNC8N62k+fe3PEgBMo+e280urEiWq3SvhkjLBYKzfG0wn1jfo/ ASsErEp9pKTG23Q1w0iKgIgvrPAWTu+VNpNY8vDYHWrP44ZRzs3WH/OC0+XdxWWmoGau NT50ztqfvqmzdY/IxFCvyLFt5+iGvdNIs8Ocq7EX4VmjQ+M+Ut1InVsVpplprhkDYltK mpuw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24483-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24483-ouuuleilei=gmail.com@vger.kernel.org" Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id a2-20020aa78642000000b006d9cb270e65si2715842pfo.392.2024.01.12.01.31.02 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jan 2024 01:31:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-24483-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-24483-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-24483-ouuuleilei=gmail.com@vger.kernel.org" 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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 5803A282290 for <ouuuleilei@gmail.com>; Fri, 12 Jan 2024 09:30:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D83005D908; Fri, 12 Jan 2024 09:29:09 +0000 (UTC) Received: from bg4.exmail.qq.com (bg4.exmail.qq.com [43.154.54.12]) (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 7FA6E5EE73 for <linux-kernel@vger.kernel.org>; Fri, 12 Jan 2024 09:29:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=tinylab.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=tinylab.org X-QQ-mid: bizesmtp89t1705051522tyz7br0a Received: from ubuntu1.. ( [221.226.144.218]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 12 Jan 2024 17:25:20 +0800 (CST) X-QQ-SSF: 01200000000000B0B000000A0000000 X-QQ-FEAT: +ynUkgUhZJlWJYfugG9WXGDVRo1HNc7HAavUfj+xVJXenq9uSV3BTSZY0AMuw glC0ZXYsPODMGDc3LZkmWwac3A3evU+fsnuR/ZjH797SUbJSaG/85nwUyXEISJwbGiDy/nu lknpE2DiK/XXC1iEHTozek2S8MxmKcZb8o8fVIrUwxPycoUKU5LoNG+h7E3x+p1uoxtEzXe ZW/u22ux0FbMUg6LRitGhstAxMmnXJP2/awUyAFqwQ3gUieGAmVAuJrfDvomBrAihkpL9FD +LDdzIPGuyONuWNCrHwqPRHk6KBc0t3uhJEWTknlojBCPw7fEUdIb83dEQlVotLOYMDUXcN 4x1NAW0+nvcfi8aspk4EemXV82O2QHkbYEqpH5GdJCdHrpvCM0= X-QQ-GoodBg: 0 X-BIZMAIL-ID: 3674884271751342367 From: Song Shuai <songshuaishuai@tinylab.org> To: mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com Cc: linux-kernel@vger.kernel.org, Song Shuai <songshuaishuai@tinylab.org> Subject: [PATCH 2/2] sched/preempt: Avoid updating for duplicate preempt mode Date: Fri, 12 Jan 2024 17:19:16 +0800 Message-Id: <20240112091916.696185-2-songshuaishuai@tinylab.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240112091916.696185-1-songshuaishuai@tinylab.org> References: <20240112091916.696185-1-songshuaishuai@tinylab.org> 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-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:tinylab.org:qybglogicsvrsz:qybglogicsvrsz4a-2 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1787876462060837889 X-GMAIL-MSGID: 1787876462060837889 |
Series |
[1/2] sched/preempt: Remove preceding unnecessary enables in __sched_dynamic_update
|
|
Commit Message
Song Shuai
Jan. 12, 2024, 9:19 a.m. UTC
When echoing the current preempt mode to /sys/kernel/debug/sched/preempt,
we don't have to update SC or SK in the sched_dynamic_update() function.
Stop it at the sched_dynamic_write() function.
Signed-off-by: Song Shuai <songshuaishuai@tinylab.org>
---
kernel/sched/debug.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/sched/debug.c b/kernel/sched/debug.c index 4580a450700e..dafcfdfae23d 100644 --- a/kernel/sched/debug.c +++ b/kernel/sched/debug.c @@ -235,7 +235,8 @@ static ssize_t sched_dynamic_write(struct file *filp, const char __user *ubuf, if (mode < 0) return mode; - sched_dynamic_update(mode); + if (preempt_dynamic_mode != mode) + sched_dynamic_update(mode); *ppos += cnt;