Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp716402rdb; Mon, 29 Jan 2024 16:37:37 -0800 (PST) X-Google-Smtp-Source: AGHT+IHTGYYVillnogfOt7gMwfwX38FvFt+xgN2uR7EhtPFtWyD0icf9BOaX3pHWUq97oZ5FKu1q X-Received: by 2002:a2e:9816:0:b0:2cd:ea12:fd8e with SMTP id a22-20020a2e9816000000b002cdea12fd8emr4350616ljj.50.1706575057360; Mon, 29 Jan 2024 16:37:37 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706575057; cv=pass; d=google.com; s=arc-20160816; b=scALJ24mgWrHy6ZUTHz4DkXcoUvlvBKlsZ1gLHvN6Vft1/ApFcBUd/WJ3C5QTX5QFW 2RTg/dJXquzBkTKbf1dQRZUzT0a0hToyG7HbpfTOgi1Yw4hgfZei6+jWdSbs3w6Di7NX lq+ZvICDM+y7V/VteHgO/axxpvTaq5faSXilzqO2Dwb1WqyWVVDh61OuslnVvXCI0xGB BnPt9mOtkxqge80sFP5Yo2PHLjN2cf66KJwTavhovCuQ61IQOpqVfPM15XAGzeBQwlS9 l+1ObP+765jcGri0Xv3wOMCXw+6MSR/0V0k4kUVOQG17OZNhlqemhuGQ1pItBsDQjbkY 4r8g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=bqKM6STmm52HJ2nwWL/mUa9wVvNf8Up7PtiKbmg/qtQ=; fh=NMRMO3/ARLLadMbwm0lrGT5uGdlSE17nB7/FgTpzG04=; b=KmZjNgBfKlmK8JwecTIwdlwZdcZdO/sMziHN2EBbrLwS8Gs9imJU5EZ/y0kwGZgb8q GpU6YmFCBQWtJ9/1oSG+bRvpc01bxhPFvpS3dZc9voSJbn7SE2ErNGafAcfpGTuM5Vmf wQqkp0acXBzdF2yc0CyZO2ltn86sibyj3CKnrQFuuCyHgNq2UVpcLJ5aq/CbM8wY2AxV wTCaW+nebLKpqINZ1OtIIGT4m/u/m78zhgYII2SHAdSPMuBox9Hz5iAY/aiC9Y5P0qMy OcCabJa/XqkZyfDKfPLlnc2OT4vIdmWDD2Gvp3K9Onq8hbFJi9ABDONN7HL7lCOrcyAk 2ndA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=anqXGWUU; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-43678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43678-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id f28-20020a50a6dc000000b0055ef2c893besi1694314edc.326.2024.01.29.16.37.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 16:37:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-43678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@layalina-io.20230601.gappssmtp.com header.s=20230601 header.b=anqXGWUU; arc=pass (i=1 spf=pass spfdomain=layalina.io dkim=pass dkdomain=layalina-io.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-43678-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-43678-linux.lists.archive=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 am.mirrors.kernel.org (Postfix) with ESMTPS id E61261F218DA for ; Tue, 30 Jan 2024 00:37:36 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF8EE208C6; Tue, 30 Jan 2024 00:36:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b="anqXGWUU" Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 71DC71E497 for ; Tue, 30 Jan 2024 00:36:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.43 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706575002; cv=none; b=VoXn0Ustmw4ILNsSPx/qs4lY1KckuPEkuv3SowX/jdwTSqMzosxKHHsTid2r8kXuPklLP1nV3MePxWEz0R7lRB+wcxc9PPMt9knNWGdlb2scsEg4/bs6hDvPuo4Fku2roAiQU9rBmKACv98L/JQ0S6+96U4NlhyU2Y4nEd8oH70= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706575002; c=relaxed/simple; bh=TqR2eUglEQwdjXW91rVEcJp8ImbPKiEAgBGAh46CadI=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=mB/XYZ538eLtXxXt3A8rGD7P3GIj1uhXHrpE4hyIs4VKnv/2QmOZuTsEcFoKVBf8lC239TaTgD1YqFfGFQgt4SY+3uAVv8rHJT08iK888nWWdBucLEgPUp9WjofBnGCPE79z7sOJB6V939CMTpTXlm+MyDt9Ax07EoNnLSJEDvU= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io; spf=pass smtp.mailfrom=layalina.io; dkim=pass (2048-bit key) header.d=layalina-io.20230601.gappssmtp.com header.i=@layalina-io.20230601.gappssmtp.com header.b=anqXGWUU; arc=none smtp.client-ip=209.85.221.43 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=layalina.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=layalina.io Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-33aef64f702so790130f8f.3 for ; Mon, 29 Jan 2024 16:36:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=layalina-io.20230601.gappssmtp.com; s=20230601; t=1706574998; x=1707179798; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=bqKM6STmm52HJ2nwWL/mUa9wVvNf8Up7PtiKbmg/qtQ=; b=anqXGWUUeLiRCQzPE7pl3Adlb0q9Bg3sXa+FVL4SKsj/7s1FJLAW4R8IrAmUCaVx7c BpxwFhQwaE5rgw8Jw63BNrYi+B3tCaukASUS4NJCNDrX+PBY1fxBDNITamRaoywZ8aOI B6axdZ4EjtROeQM7/YpDlgj43ePMxHfM41XiidtxdzdLm0RktCZpn7ahXdFejpMkpoka JYnsT57KK3NkvGzTxO5I+TREkM0t1miGwphtVOCcUCPEjP4yGsz24n/pNVHkV379s9eB 6vnYteOugHyiuHSV5VWLZBiCPdWR4xnNtvpgrjf6TgSup0ngfIuI44PdXII17ZyaX68P mD4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706574998; x=1707179798; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=bqKM6STmm52HJ2nwWL/mUa9wVvNf8Up7PtiKbmg/qtQ=; b=jRDeCPCUz4b4Wn1yzU/f4+ht0VK0oD6RyJS9PJqMoBoe72M042njViw66Sk08qYKcf 48t6eqA8KE/biVha3Bm197gd670YtYy72dMTtWU/Tjwta7LIpG4CxocD/97YBXZ0sg1K AL3fmmKynjTP8xQTRoj6rs7XaWm6RKBVfazOx0v6YKSQWkWwBh7RXHNISM8eyjfVYaIl LO63z0OxbSiWdyUaMbGE6oWlSoceCg4xT87Ae7RQTkLkBZ4XilvanqhMawqIIf6iMjnA w/0HZhq/A25OxnkZU+ymUI7Wbxj6oQx5W9T+UnS+T8gqp1dAax0cvlkBDbZw9VMXzQbM Tr/Q== X-Gm-Message-State: AOJu0YyX1YdBC1RkOLCs+1X/tFDsIgHv7c/YkEq6rA+qPBvKnvvgi9ya Y/CU50Vqu7l8kHoDz8Kdz2VnpWZSew0iaBOSL3nMjmWvuYuuvwnCcZKOnXum/iE= X-Received: by 2002:a05:6000:930:b0:337:c872:7153 with SMTP id cx16-20020a056000093000b00337c8727153mr5001577wrb.46.1706574997649; Mon, 29 Jan 2024 16:36:37 -0800 (PST) Received: from airbuntu ([213.122.231.14]) by smtp.gmail.com with ESMTPSA id d5-20020adffbc5000000b0033aedaea1b2sm3763339wrs.30.2024.01.29.16.36.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Jan 2024 16:36:37 -0800 (PST) Date: Tue, 30 Jan 2024 00:36:35 +0000 From: Qais Yousef To: Vincent Guittot Cc: linux@armlinux.org.uk, catalin.marinas@arm.com, will@kernel.org, sudeep.holla@arm.com, rafael@kernel.org, viresh.kumar@linaro.org, agross@kernel.org, andersson@kernel.org, konrad.dybcio@linaro.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, dietmar.eggemann@arm.com, rostedt@goodmis.org, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, lukasz.luba@arm.com, rui.zhang@intel.com, mhiramat@kernel.org, daniel.lezcano@linaro.org, amit.kachhap@gmail.com, corbet@lwn.net, gregkh@linuxfoundation.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v4 5/5] sched/pelt: Remove shift of thermal clock Message-ID: <20240130003635.anipjhfdfld3xcil@airbuntu> References: <20240109164655.626085-1-vincent.guittot@linaro.org> <20240109164655.626085-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 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20240109164655.626085-6-vincent.guittot@linaro.org> On 01/09/24 17:46, Vincent Guittot wrote: > 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 > --- Better without it, yes. Reviewed-by: Qais Yousef > .../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 65731b060e3f..2ee15522b15d 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++ b/Documentation/admin-guide/kernel-parameters.txt > @@ -5722,6 +5722,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 a6f084bdf1c5..c68e47bfd5ae 100644 > --- a/kernel/sched/core.c > +++ b/kernel/sched/core.c > @@ -5670,7 +5670,7 @@ void scheduler_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 f1c3d600d6d6..d5ba6cdb141c 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); > @@ -9247,7 +9241,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 677d24202eec..6fc6718a1060 100644 > --- a/kernel/sched/sched.h > +++ b/kernel/sched/sched.h > @@ -1520,24 +1520,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); > -- > 2.34.1 >