Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp832099ybm; Wed, 27 May 2020 09:03:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzuWkpHKP0JFztzvoxxWSKbKvLFtvlcRSwryIh0Wpcl9Gmt7MV0Ecs7eD5n1RorDt179G9B X-Received: by 2002:a50:a7a5:: with SMTP id i34mr14925863edc.55.1590595420195; Wed, 27 May 2020 09:03:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590595420; cv=none; d=google.com; s=arc-20160816; b=sXjyq5++gUUxJRp+YATd3iyF//bkn0i2Pq7BpS1BQhDv9YS6umghDfILTqOVNqVVuZ MA+r+1J4hkvCEZf4cr2Bo4zlWNzbSqvFnBKEXtJQZOsLygy+KBbHzqOz3ZgCujvVMa1d RMI91rSyCDCsWR5+vcNxVEZbWCwJao+0+mln3w90U1KYjldf9loo7bZnBPTeT+F24fRl 1lC+nczqVMZZJOtxpoEW/RRHF3LJAriFtoWAWKGUqhiTL9XPaPUJfTBIzRUBn2xnpU99 /9GYSEY8XAFcto/SYwr2uNjgCTDtXhbEW/N0AvUNZEMvtskkDe/Gnt340W2v13rDXHKb lfpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=5Vx58Hq7sHLXBsQGSYl+3QZFOqiNWHmAX7GPof+o7eQ=; b=T1LLv1cHYMK01KHC8GhoC+UppKxvcqTNf+nynuTTB6X9W93+60Wk/vh9UOqVxPko49 oJ8rqV+YGpADDb7Ff9cUoksgEopKRcppZ51CyOPNnzsl30HXwpOOZTa/GOtYWAl7Nlet wq07shn6NIE80IhalXjbHoIzlntWSKHQHl/vLAGjkakzq7Fql3POSvHOhXFtd0PYYmTs OjrkzjtHRa4h4wqP+4afcZ2a4Gt7iHLPzppyYA8mQLyfok/mKCCDWBGKvAhjW4Cpfxrm J2YyUJM44wWKeauKHcCWYboEmD89x8ioqR3A2V3+INdQUAXTGGHZTZO1leOPbbAaJwa2 HFqQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u14si2287351ejx.342.2020.05.27.09.03.16; Wed, 27 May 2020 09:03:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389531AbgE0PEH (ORCPT + 99 others); Wed, 27 May 2020 11:04:07 -0400 Received: from mail-ot1-f67.google.com ([209.85.210.67]:44167 "EHLO mail-ot1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388922AbgE0PEF (ORCPT ); Wed, 27 May 2020 11:04:05 -0400 Received: by mail-ot1-f67.google.com with SMTP id f18so19381794otq.11; Wed, 27 May 2020 08:04:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=5Vx58Hq7sHLXBsQGSYl+3QZFOqiNWHmAX7GPof+o7eQ=; b=RPNRGy3RVD/8p8fIS/e71D1IzKwwT4JtFTrm+9lC/39N5oDVv48rysacQmI6AmEc0m 3w5UTJ+iK/gdHOuIgFP/gtFpyWpP0wbVZCIbsEpT6UHN2M2vLki4/LyIBAVsP/0LsdsK bAWezmc21ocmBiJRM12Zwxa8XKiFSovo1HnPZAmARVo/PJIB2GPTe4hCuFGiB1It6jKu IeZN7xuwvAw5rSuUZVeDEEYZQKPgPxhkbpIemItMRjxrE/PUtos40b4sWDmJXNO9Knqt Tzsk464l6sECog1uDQqAsyK5/tTyOzvSOpGG3jmKABi2ZeyfOIWFfOdl+Xffd1EIq57T A27Q== X-Gm-Message-State: AOAM533q0gyFdGO7ekckdz3fm/enUSJCCyHIxy1XGwZFLpIag6VHdc3p o2C66z/zAwxAkAGZ41kL5kH/uO0AQ2j97OcfaVM= X-Received: by 2002:a9d:4713:: with SMTP id a19mr4711281otf.167.1590591844210; Wed, 27 May 2020 08:04:04 -0700 (PDT) MIME-Version: 1.0 References: <20200526151619.8779-1-benjamin.gaignard@st.com> <51917583-f8ff-3933-7783-2eedc91484a4@st.com> In-Reply-To: From: "Rafael J. Wysocki" Date: Wed, 27 May 2020 17:03:52 +0200 Message-ID: Subject: Re: [RFC RESEND 0/3] Introduce cpufreq minimum load QoS To: Benjamin GAIGNARD Cc: Vincent Guittot , Valentin Schneider , "rjw@rjwysocki.net" , "viresh.kumar@linaro.org" , Hugues FRUCHET , "mchehab@kernel.org" , "mcoquelin.stm32@gmail.com" , Alexandre TORGUE , "pavel@ucw.cz" , "len.brown@intel.com" , "linux-pm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-media@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 27, 2020 at 4:54 PM Benjamin GAIGNARD wrote: > > > > On 5/27/20 2:48 PM, Benjamin GAIGNARD wrote: > > > > > > On 5/27/20 2:22 PM, Vincent Guittot wrote: > >> On Wed, 27 May 2020 at 13:17, Benjamin GAIGNARD > >> wrote: > >>> > >>> > >>> On 5/27/20 12:09 PM, Valentin Schneider wrote: > >>>> Hi Benjamin, > >>>> > >>>> On 26/05/20 16:16, Benjamin Gaignard wrote: > >>>>> A first round [1] of discussions and suggestions have already be > >>>>> done on > >>>>> this series but without found a solution to the problem. I resend > >>>>> it to > >>>>> progress on this topic. > >>>>> > >>>> Apologies for sleeping on that previous thread. > >>>> > >>>> So what had been suggested over there was to use uclamp to boost the > >>>> frequency of the handling thread; however if you use threaded IRQs you > >>>> get RT threads, which already get the max frequency by default (at > >>>> least > >>>> with schedutil). > >>>> > >>>> Does that not work for you, and if so, why? > >>> That doesn't work because almost everything is done by the hardware > >>> blocks > >>> without charge the CPU so the thread isn't running. I have done the > >>> tests with schedutil > >>> and ondemand scheduler (which is the one I'm targeting). I have no > >>> issues when using > >>> performance scheduler because it always keep the highest frequencies. > >> IMHO, the only way to ensure a min frequency for anything else than a > >> thread is to use freq_qos_add_request() just like cpufreq cooling > >> device but for the opposite QoS. This can be applied only on the > >> frequency domain of the CPU which handles the interrupt. > > I will give a try with this idea. > > Thanks. > > Adding freq_qos_add_request(FREQ_QOS_MIN) when starting streaming frames > solve my problem. I remove the request at the end of the streaming to > restore > the default value. You may as well add the request once at the init time with the request value set to PM_QOS_MIN_FREQUENCY_DEFAULT_VALUE initially and update it as needed going forward.