From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B9AFC3A5A9 for ; Mon, 4 May 2020 09:18:06 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2E3AA206B9 for ; Mon, 4 May 2020 09:18:06 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SAO84fdl"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=st.com header.i=@st.com header.b="SKVrCXff" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2E3AA206B9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=st.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To: References:Message-ID:Date:Subject:To:From:Reply-To:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=asOHCXwynP6RA1j+/N8YT1l3CVNwmTqRVJq+M0y7wgM=; b=SAO84fdlLq0OKI s7KvQ/wdPCAJwyv2um8O4nLo/rAE3st1HD3niG7j1KSvK+1EuvxjXJrAz5/LecxjUb2xLiC4Q0aNn RPGlvoR2TGCdAsmr4kU5KW7dzGlHODVAZ5cag4lojivPTcTF1yMbMyAQhIJnkNZYTtln39eDdc6A9 sXSJftRCqpsV7SMxw5hw4+np69oGy350HnA4ZHYRjCn5X4NLp8NMLEOWZrx6IwmSrZL35JADR7gXF MLD3BzKP6GnCgr/1xbn708JbJ06y7Fovrd5pkHnFIDdbhi2Ft1YGDM6Haux8A4FmPhmOYNggwRR3F b0Md7LIRh+etBR3DI3jA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVXEg-0003UH-5e; Mon, 04 May 2020 09:18:02 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jVXEd-0003TH-Am for linux-arm-kernel@lists.infradead.org; Mon, 04 May 2020 09:18:01 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 044978Ts004044; Mon, 4 May 2020 11:17:45 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=st.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=STMicroelectronics; bh=t8yE9JoGl4flloHQYJEWfkrlpSIqoEFqyExGxmwsMx8=; b=SKVrCXff3h/xL4m3odmOVBOJUf2qGJNoKtavF7W6Rz0kENh4xvZMCpxwYDsfw58rWIxe uHRuHlXRWPeptG3pU39cL8A4BE1d0BtwMYevfaQHB/x2JNqzO9+rv8pP8e/Bm++04prk NdRdpi514nAwSf9qy1Vh0haZNOCXBmidZqBMY04DfYc6MFpEo1X2u3FXlifIRn7rEtbt SHgnlyxsUf/vuXjEWSG7CZZ98MkRvZu5Ey0Me0w2BRr4wkDbaVHNUqljBSysarYiAjBl atBmEB2Osx42GsTLk8y13PzfkW51ioujPXV2+37zvew1lZHY8NySEcot5hhcDaqikLV2 xg== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com with ESMTP id 30rx089j7y-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 04 May 2020 11:17:45 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1E65710002A; Mon, 4 May 2020 11:17:41 +0200 (CEST) Received: from Webmail-eu.st.com (sfhdag5node3.st.com [10.75.127.15]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id D3AA22BBAA5; Mon, 4 May 2020 11:17:41 +0200 (CEST) Received: from SFHDAG3NODE3.st.com (10.75.127.9) by SFHDAG5NODE3.st.com (10.75.127.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Mon, 4 May 2020 11:17:41 +0200 Received: from SFHDAG3NODE3.st.com ([fe80::3507:b372:7648:476]) by SFHDAG3NODE3.st.com ([fe80::3507:b372:7648:476%20]) with mapi id 15.00.1347.000; Mon, 4 May 2020 11:17:41 +0200 From: Benjamin GAIGNARD To: Valentin Schneider Subject: Re: [RFC 0/3] Introduce cpufreq minimum load QoS Thread-Topic: [RFC 0/3] Introduce cpufreq minimum load QoS Thread-Index: AQHWGi06wBgeAQBseECYOK/U7Qvw76iQJdAAgAACCYCAAAQ3AIABBseAgAAT0wCAAE7QgIAADU2AgAARzICAAAO9AIAF2zaA Date: Mon, 4 May 2020 09:17:41 +0000 Message-ID: References: <20200424114058.21199-1-benjamin.gaignard@st.com> <7657495.QyJl4BcWH5@kreacher> <30cdecf9-703a-eb2b-7c2b-f1e21c805add@st.com> <70e743cf-b88e-346a-5114-939b8724c83d@arm.com> <6b5cde14-58b3-045d-9413-223e66b87bf0@st.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.75.127.44] Content-ID: MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.676 definitions=2020-05-04_05:2020-05-01, 2020-05-04 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200504_021759_822026_47B7CD4B X-CRM114-Status: GOOD ( 20.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "len.brown@intel.com" , Alexandre TORGUE , "Rafael J. Wysocki" , "viresh.kumar@linaro.org" , "pavel@ucw.cz" , "linux-pm@vger.kernel.org" , "Rafael J. Wysocki" , "linux-kernel@vger.kernel.org" , Patrick Bellasi , "mcoquelin.stm32@gmail.com" , Hugues FRUCHET , "mchehab@kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , "linux-media@vger.kernel.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 4/30/20 5:50 PM, Valentin Schneider wrote: > On 30/04/20 16:37, Benjamin GAIGNARD wrote: >> On 4/30/20 4:33 PM, Valentin Schneider wrote: >>> On 30/04/20 14:46, Benjamin GAIGNARD wrote: >>>>> That's not what I meant. >>>>> >>>>> I suppose that the interrupt processing in question takes place in >>>>> process context and so you may set the lower clamp on the utilization >>>>> of the task carrying that out. >>>> I have try to add this code when starting streaming (before the first >>>> interrupt) the frames from the sensor: >>>> const struct sched_attr sched_attr = { >>>> .sched_util_min = 10000, /* 100% of usage */ >>> Unless you play with SCHED_CAPACITY_SHIFT, the max should be 1024 - >>> i.e. SCHED_CAPACITY_SCALE. That's a really big boost, but that's for you to >>> benchmark. >>> >>>> .sched_flags = SCHED_FLAG_UTIL_CLAMP_MIN, >>>> }; >>>> >>>> sched_setattr(current, &sched_attr); >>>> >>>> I don't see any benefices maybe there is some configuration flags to set. >>>> >>>> How changing sched_util_min could impact cpufreq ondemand governor ? >>>> Does it change the value returned when the governor check the idle time ? >>>> >>> You'll have to use the schedutil governor for uclamp to have an effect. And >>> arguably that's what you should be using, unless something explicitly >>> prevents you from doing that. >> Even with schedutil and SCHED_CAPACITY_SCALE that it doesn't work. >> cpufreq/cpuinfo_cur_freq values are always on the max value even if the >> stats show transitions between the available frequencies. >> >> I see two possibles reasons to explain that: >> - sched_setattr() is called in userland process context, but the >> threaded irq handler is running in another process. > Ah yes, this only works if the task you boost is the one that will handle > whatever work you care about (in this case handling the irq). That said, if > you do use threaded IRQs, that should give you a SCHED_FIFO thread, which > should drive the frequency to its max when using schedutil (unrelated to > uclamp). Can I conclude that sched_setattr() isn't the good way to solve this problem ? Does my patches make sense in this case ? >> - because this use case is almost running all in hardware the process >> isn't doing anything so the scheduler doesn't take care of it. >> >>>>> Alternatively, that task may be a deadline one. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel