Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1067956rdg; Fri, 11 Aug 2023 08:44:23 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEhzN4W3C5AmtthEYMIp8BWiW37BCZZG/XCokF7Vb3mbFj5bY2EvyoI0LGzvO7b4Wak/nMT X-Received: by 2002:a05:6512:3b8:b0:4fe:c6c:ac95 with SMTP id v24-20020a05651203b800b004fe0c6cac95mr1412172lfp.35.1691768663050; Fri, 11 Aug 2023 08:44:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691768663; cv=none; d=google.com; s=arc-20160816; b=FhXYcB3a2HMMzcwRy67Yb4iL0EUENSpEHjaThxrPR8kENDRmLXl1uWf1WVfQDfI8Uy ywTrQGDaDHWNt3i1KkHb5FVpjFso5EwpOSivFozIRELE+YKuClsuhUAos5v2rjpLGf5V CdqxipSJZUTjmkIzbGqrC9gh+d5ihn5kvtn1MRV0AcQD9KFSdrA+BIK8D/Li3iJOvtzr m1feO7pyrRgsx0I6wtSuNK7VTuLBcscFSpCDMc1GUa57FrxKFFcBBViKjVqk+WRbTBUq P//utseW0SmGVJqyh6VZZO8wXkh0Z5SZS74jokSrDHLSQOBmP1aRmWON8Tw/K33gxtK2 zsvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=BWwY6JgMPJZ77pxQWRRQJvc1znKRLfEe1jHuGmUpyxs=; fh=YuGfvksOnsud5/c0q332KW6pBgkcwjQK8S9CAcossmo=; b=duJcor+PTnYDMoxSnhz2LsRbvwfIRAv5YK4Id4o7/N6qaAXwmRpVAmeYOz9t96xNwp BHqOCHQ5VRlgikrNusu9wHUwYF9/M1sumvfbH1udiboDBx+sPvh+5TUn709UCUN8HX9G K3uY06kfbosaUsgkdh0XkuUQRe4yQ2C3haKw5NBy4XdtWsOTaEmqUqIzMDB7d64Onxhv cpL8Ol8FuAln7hEb2sdjR9q8x95JYpQtuLDymccKH8J7Yo49CH0MBvSfa1X8WSIGnEOD SI6GiCOa7Ztc6gpfesbgpD6lknRnR9mapOTb8oI5ML5OFTEERRckaCMkLSc+eXheNqp2 vjOQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s3-20020aa7d783000000b0052326100aaasi3475087edq.644.2023.08.11.08.43.57; Fri, 11 Aug 2023 08:44:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236088AbjHKPR3 (ORCPT + 99 others); Fri, 11 Aug 2023 11:17:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236030AbjHKPR1 (ORCPT ); Fri, 11 Aug 2023 11:17:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E48D530DD; Fri, 11 Aug 2023 08:17:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 72BB46747F; Fri, 11 Aug 2023 15:17:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9247C433C9; Fri, 11 Aug 2023 15:17:20 +0000 (UTC) Date: Fri, 11 Aug 2023 11:17:19 -0400 From: Steven Rostedt To: Atul Pant Cc: rafael@kernel.org, daniel.lezcano@linaro.org, mingo@redhat.com, peterz@infradead.org, juri.lelli@redhat.com, vincent.guittot@linaro.org, dietmar.eggemann@arm.com, bsegall@google.com, mgorman@suse.de, bristot@redhat.com, vschneid@redhat.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, quic_ashayj@quicinc.com, quic_rgottimu@quicinc.com, quic_shashim@quicinc.com Subject: Re: Prevent RT-throttling for idle-injection threads Message-ID: <20230811111719.17f9965a@gandalf.local.home> In-Reply-To: <20230808112523.2788452-1-quic_atulpant@quicinc.com> References: <20230808112523.2788452-1-quic_atulpant@quicinc.com> X-Mailer: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.6 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 8 Aug 2023 16:55:23 +0530 Atul Pant wrote: > Hi all, > We are trying to implement a solution for thermal mitigation by using > idle injection on CPUs. However we face some limitations with the current > idle-inject framework. As per our need, we want to start injecting idle > cycles on a CPU for indefinite time (until the temperature/power of the > CPU falls below a threshold). This will help to keep the hot CPUs in the > sleep state until we see improvement in temperature/power. If we set the > idle duration to a large value or have an idle-injection ratio of 100%, > then the idle-inject RT thread suffers from RT throttling. This results > in the CPU exiting from the sleep state and consuming some power. > > The above situation can be avoided, if we can prevent RT throttling on > the injected CPU. With the currently available sysctl parameters, > sched_rt_runtime_us and sched_rt_period_us, we can prevent RT throttling > by either setting sched_rt_runtime_us equal to sched_rt_period_us or, > setting sched_rt_runtime_us to -1. Since these parameters are system > wide, so it will affect the RT tasks on non idle-injected CPUs as well. > To overcome this, will it be feasible to have these two parameters on a > per CPU basis? This will allow to selectively disable RT throttling on > idle-injected CPUs. I wonder if the deadline scheduler that Daniel is working on would help in this case? -- Steve