Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp317353lqd; Wed, 24 Apr 2024 03:22:41 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCW1CnYSCLm435OfvJbKiO8WRYq5lAJm4ptbOxsaLM6wSZgskwR0fCJzyD60yw+wESb2tWAS+IOLttVJKLB+Zrxn+Q6h9sn7EylkSQ+DEg== X-Google-Smtp-Source: AGHT+IEF5owcEdskXngjdvqA/1sNbMSFQ7VJiTzHPu3I8uVFZrDcyGoUzekdr3DGZCtCNgpRXeAB X-Received: by 2002:a05:620a:40cb:b0:78f:ff3:7c8e with SMTP id g11-20020a05620a40cb00b0078f0ff37c8emr3692502qko.7.1713954160931; Wed, 24 Apr 2024 03:22:40 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713954160; cv=pass; d=google.com; s=arc-20160816; b=icf5pzNzd1qPhcplCMmhmiQ9JxWW95JfD9QWVnaZ6KKndhXwvqtAKCuhu6jxw6M8tx w045uEaqBchgq3SJVXajC2+2Wjf81VKzpHcDLpBf+EH1IYUJuEK54Of5FsuNWFUsVjTf MMKPx/mOT8TTzFzSSkCaEPdUIBds/+nEdrWoiebZab5WVnSWuhiGteVXcCsBfFzPHl6+ DzK2UkUR4LsxpI6dKtDUzNl3sLyA3P35orpUNNYT4EwEyGuc+jahRxiaKXXzc37C4NQD VqMdMWyhw0R0OIFRjrxp3de1aUl7+MKf5VmD+VCFb8cwSAhzT4xO13K8jzP+15wA+cn6 jTLQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:precedence:robot-unsubscribe:robot-id :message-id:mime-version:list-unsubscribe:list-subscribe:list-id :precedence:references:in-reply-to:cc:subject:to:reply-to:sender :from:dkim-signature:dkim-signature:date; bh=w6cTIC5+dPTqSbpBWUDyfvIYbWqBu90juHkYMhfCHuU=; fh=roYHTfQ2Fh2RHTCBAuEnwlXhT2syDIcbAP6smDkEYWM=; b=esSIs42ztqxyliCFmZP58j3+wxsYtaC3QZZ7wR82ovBi7BS4ZoKdO7z7toLjBF/a/K PoxW6rkbIcmDII+FJX8csURakT6vuQLHAb4rgk6LG0VWiBDK2W/ODTP4CfIdIThF/B8I M6xORPA48W3VX87saptC0GRAJxcYSNFdjpO1Z/yZX9/FEHkS5y/2ez9c2+GIgteDDb5E dxlWyji1ift1n2RnGKH4e3pWbRwBmPmNsMonrkeqPts4sEg+vNif/7+IX0rizm1ebQzR NhezaiaRfbchpEqVsJXa3iZpXRCc5eVjAY3zgP2FMv3isIEPGVd60p2c8qFpQm6CmnnH Y2Nw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=HAZnfvH9; 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-156712-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156712-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id a9-20020a05620a102900b0078eeda64062si14753231qkk.495.2024.04.24.03.22.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 03:22:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-156712-linux.lists.archive=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=@linutronix.de header.s=2020 header.b=HAZnfvH9; 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-156712-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-156712-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id A4FC01C20E09 for ; Wed, 24 Apr 2024 10:22:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1EB601598F3; Wed, 24 Apr 2024 10:22:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="HAZnfvH9"; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b="Ci8CzZYm" 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 99C85159589; Wed, 24 Apr 2024 10:22:16 +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=1713954138; cv=none; b=VKru2TrK4WW237UAlCxD0DW8oGHHPh2RhJ8jEyRzMZw8SZrxhw3wkHJCWl3mD7F2faKtoSS1zT8MOoGV0uQV8KmbAWFZF9Lv0QB4pJzMtmDLe6H3CPZEkHMmT2ohm/hjh0dsdlzej50fbp824vRxMJt7xL3p3uSrK9ODKclwXGA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713954138; c=relaxed/simple; bh=c58ruGXdHBHTiN0JCnQnjfVOvlIsy4P4n7D1gbAveeM=; h=Date:From:To:Subject:Cc:In-Reply-To:References:MIME-Version: Message-ID:Content-Type; b=UbzgxO4wG/a8y1+z742Iazd5qa7kdTmGF/U3np0ccXbKeBJT9OORm6PFIo1/CIaivLT6IprXxcldOpmB5iCUHT/ukhRBs1CZtcldl4rAWP5e17uG0IAYFh8CNoagctOepMCnxITChGPtpqQ00IW13UbVUYulx6GcOJKamUFlBW4= 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=HAZnfvH9; dkim=permerror (0-bit key) header.d=linutronix.de header.i=@linutronix.de header.b=Ci8CzZYm; 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 Date: Wed, 24 Apr 2024 10:22:13 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1713954134; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w6cTIC5+dPTqSbpBWUDyfvIYbWqBu90juHkYMhfCHuU=; b=HAZnfvH9OpaUpb/HmWED6G+OAQ59vMnuVIQh29NkR4iXU/7RxatTB6Zwmz3CdpEwS80SDx IwLWwNobLq7eg4/JifrHas9mzVYBPawTuvdve7bDvt3xP8aa9wR3Tr2V/PuYR4mwubxlbo pUw/ykr4MQ6222WhPqexIPi7jfLTE5HYSLAUAHFmXwKwBk70/JAn6njIEpnzrbQCzcZ183 61s59YZxyNe2tbfBEWS9UEsKD3U7uujRXnh0Bz77TGoZ+9uL3WIyYdXeAWG6BfOXo4hBzl uWa7rRbJFVzS1KTcp5SGYfT0ia2dSJ523erNm2TQH6f8rUrQ9ihHM6BgRgDrUg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1713954134; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=w6cTIC5+dPTqSbpBWUDyfvIYbWqBu90juHkYMhfCHuU=; b=Ci8CzZYmlwKX6UmZgp/9OmRZLllmoMeitR5GeaapB9M34xdkbaDV3FyiCie9WR7Opjl15g FfeePigvDq8v+WDg== From: "tip-bot2 for Vincent Guittot" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: sched/core] sched/pelt: Remove shift of thermal clock Cc: Vincent Guittot , Ingo Molnar , Lukasz Luba , Qais Yousef , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20240326091616.3696851-6-vincent.guittot@linaro.org> References: <20240326091616.3696851-6-vincent.guittot@linaro.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-ID: <171395413392.10875.3951642329310305062.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails Precedence: bulk Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit The following commit has been merged into the sched/core branch of tip: Commit-ID: 97450eb909658573dcacc1063b06d3d08642c0c1 Gitweb: https://git.kernel.org/tip/97450eb909658573dcacc1063b06d3d08642c0c1 Author: Vincent Guittot AuthorDate: Tue, 26 Mar 2024 10:16:16 +01:00 Committer: Ingo Molnar CommitterDate: Wed, 24 Apr 2024 12:08:02 +02:00 sched/pelt: Remove shift of thermal clock The optional shift of the clock used by thermal/hw load avg has been introduced to handle case where the signal was not always a high frequency hw signal. Now that cpufreq provides a signal for firmware and SW pressure, we can remove this exception and always keep this PELT signal aligned with other signals. Mark sysctl_sched_migration_cost boot parameter as deprecated Signed-off-by: Vincent Guittot Signed-off-by: Ingo Molnar Tested-by: Lukasz Luba Reviewed-by: Qais Yousef Reviewed-by: Lukasz Luba Link: https://lore.kernel.org/r/20240326091616.3696851-6-vincent.guittot@linaro.org --- Documentation/admin-guide/kernel-parameters.txt | 1 +- kernel/sched/core.c | 2 +- kernel/sched/fair.c | 10 +-------- kernel/sched/sched.h | 18 +---------------- 4 files changed, 4 insertions(+), 27 deletions(-) diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index bb884c1..3f390cc 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -5807,6 +5807,7 @@ but is useful for debugging and performance tuning. sched_thermal_decay_shift= + [Deprecated] [KNL, SMP] Set a decay shift for scheduler thermal pressure signal. Thermal pressure signal follows the default decay period of other scheduler pelt diff --git a/kernel/sched/core.c b/kernel/sched/core.c index 67a8302..1a91438 100644 --- a/kernel/sched/core.c +++ b/kernel/sched/core.c @@ -5680,7 +5680,7 @@ void sched_tick(void) update_rq_clock(rq); hw_pressure = arch_scale_hw_pressure(cpu_of(rq)); - update_hw_load_avg(rq_clock_hw(rq), rq, hw_pressure); + update_hw_load_avg(rq_clock_task(rq), rq, hw_pressure); curr->sched_class->task_tick(rq, curr, 0); if (sched_feat(LATENCY_WARN)) resched_latency = cpu_resched_latency(rq); diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c index eef39ae..9eb6357 100644 --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c @@ -78,15 +78,9 @@ static unsigned int normalized_sysctl_sched_base_slice = 750000ULL; const_debug unsigned int sysctl_sched_migration_cost = 500000UL; -int sched_hw_decay_shift; static int __init setup_sched_thermal_decay_shift(char *str) { - int _shift = 0; - - if (kstrtoint(str, 0, &_shift)) - pr_warn("Unable to set scheduler thermal pressure decay shift parameter\n"); - - sched_hw_decay_shift = clamp(_shift, 0, 10); + pr_warn("Ignoring the deprecated sched_thermal_decay_shift= option\n"); return 1; } __setup("sched_thermal_decay_shift=", setup_sched_thermal_decay_shift); @@ -9367,7 +9361,7 @@ static bool __update_blocked_others(struct rq *rq, bool *done) decayed = update_rt_rq_load_avg(now, rq, curr_class == &rt_sched_class) | update_dl_rq_load_avg(now, rq, curr_class == &dl_sched_class) | - update_hw_load_avg(rq_clock_hw(rq), rq, hw_pressure) | + update_hw_load_avg(now, rq, hw_pressure) | update_irq_load_avg(rq, 0); if (others_have_blocked(rq)) diff --git a/kernel/sched/sched.h b/kernel/sched/sched.h index 993edb0..cb3792c 100644 --- a/kernel/sched/sched.h +++ b/kernel/sched/sched.h @@ -1550,24 +1550,6 @@ static inline u64 rq_clock_task(struct rq *rq) return rq->clock_task; } -/** - * By default the decay is the default pelt decay period. - * The decay shift can change the decay period in - * multiples of 32. - * Decay shift Decay period(ms) - * 0 32 - * 1 64 - * 2 128 - * 3 256 - * 4 512 - */ -extern int sched_hw_decay_shift; - -static inline u64 rq_clock_hw(struct rq *rq) -{ - return rq_clock_task(rq) >> sched_hw_decay_shift; -} - static inline void rq_clock_skip_update(struct rq *rq) { lockdep_assert_rq_held(rq);