Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp54349ybt; Thu, 18 Jun 2020 18:04:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJymx5lXcSaH4YMy9NxzhdOVJrI+kL6GwR8+FL0G0cbcTGTCN5haBZyC7JVFPE5fbi1KMi7K X-Received: by 2002:a17:906:470b:: with SMTP id y11mr1379253ejq.182.1592528644099; Thu, 18 Jun 2020 18:04:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592528644; cv=none; d=google.com; s=arc-20160816; b=SvqAfvoZavyi/LD5X0pq+WBLSfpW0P/8h4046GMHTP7PvIhV52bIDf3pgVV7QTWZZs ulOH2TPIg3s8KqapnkWmdKTQ9PphNZTl7a+MmuSlM1qeQ7+eEj/PxmDBEhxeNGr7s1il nOgeQ3VCYdWqU7WogyR9eZehwnuPPyXlQGt5nRzq0OsGbk6K706wz7mqVu8xGL8FN949 n8+4is7CfnaLZbrEsawirROn/Ac0zgrGrT7QZUtI6aFIn8+xuzCIHFl9LzPPr73LWGD7 BNbyxmTbODDCh9dwrznyg1frREyqXfbzaW1srwHnZfFwoS9epSMjPxXrLdHITnF0hg2c xjTQ== 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:dkim-signature; bh=nnvXnZQHRkFSp3+nnoBZSo/h988GlGZ2uvOYYP79VTo=; b=KU8xTkcBL5Sii2SKeIc3RoYZAFFOZVeVadYlKpeQG0WW4bNE2/jrGDWgDKT+vPWMvh A6DsDXqEwk/5HfLRhTObvzhGNrynF/LqPRULf1wBGXPst8alSR78ftdM2wb6mWrVP0Aa YzW7J9q70Fo5K1vAAuK5ea0vLHZXd0Qxun7tE19hBdMvwBI7OOTz6o7FU75EpsmuVPO1 62Q/yMfeV60//y4kFMerbyD8NVgN8/kXXuWGLtUTcn4WG+otjbVAkvuZgW0T9qqDuovT lfig6awO9Pcdo0zoxYL02Jd/5FDaiJs8UGuzICi7p77Ph6jIJ8tCXzI+c8AAnSO5TGoI gEYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=HW1Tipiz; 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=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a14si2756662edv.549.2020.06.18.18.03.41; Thu, 18 Jun 2020 18:04:04 -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; dkim=pass header.i=@chromium.org header.s=google header.b=HW1Tipiz; 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=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731065AbgFRVbg (ORCPT + 99 others); Thu, 18 Jun 2020 17:31:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35688 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725987AbgFRVbf (ORCPT ); Thu, 18 Jun 2020 17:31:35 -0400 Received: from mail-vk1-xa44.google.com (mail-vk1-xa44.google.com [IPv6:2607:f8b0:4864:20::a44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F203C06174E for ; Thu, 18 Jun 2020 14:31:35 -0700 (PDT) Received: by mail-vk1-xa44.google.com with SMTP id s6so1806053vkb.9 for ; Thu, 18 Jun 2020 14:31:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=nnvXnZQHRkFSp3+nnoBZSo/h988GlGZ2uvOYYP79VTo=; b=HW1Tipiz+3fXmY+92yju6UzqYt6/1x+/6EOhNeho+ovyIr/NcVXPsg6ausEZ96VNr+ XWQB0jnpIVLngiIJvGw8RlpTmovrn2guTSkYP8kPn3sN4pfuxKpdW0BCanHPkeR17gT4 LHi6n0LPxAxQzGWKVfDk+JG5cOOOO/TZN8odY= 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=nnvXnZQHRkFSp3+nnoBZSo/h988GlGZ2uvOYYP79VTo=; b=JmXPbwSdc7Ou9g1v/uorYLa+e1+7G7kTlagZUE9wLXNU5zrfsFcYRUe3y9WbTkuux2 tZOMnTex2pG54F/mBWY1yIDl9oC+WwF24jwedUpRxw8pwhzWCnZluD5O21HNAPTHJBJX 9wQ9Uh6A5lqogPJj8Pj7lKQGpQD/XFFTfKDn6Q3Q8f8qGZ66ThFuUe3dvXEwTEJsGlVJ yJlsHBzBXww/pMasZTIJwXKg2DzoXWkOyVj+f6Sm9X/ZQepyn/Z+eTob4DpMLG9X/zem jTMfDKTJhsZ+Q122bwBTmNyTXetcIWuFsAMc5U3drgqIoiHv5hy4xTb3EUj6iBMp3k11 i2fA== X-Gm-Message-State: AOAM533QVi6rg8O6doDfLV7zRQxMRBXmgYA4VNYPkSFbBfpS1MHKDE+m kgFHhiY5vf+wBteY28eEj8Yz0JyQ2Qg= X-Received: by 2002:a1f:344f:: with SMTP id b76mr5218195vka.33.1592515894437; Thu, 18 Jun 2020 14:31:34 -0700 (PDT) Received: from mail-vk1-f172.google.com (mail-vk1-f172.google.com. [209.85.221.172]) by smtp.gmail.com with ESMTPSA id n12sm414001uap.8.2020.06.18.14.31.33 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 18 Jun 2020 14:31:34 -0700 (PDT) Received: by mail-vk1-f172.google.com with SMTP id e1so1810528vkd.1 for ; Thu, 18 Jun 2020 14:31:33 -0700 (PDT) X-Received: by 2002:a1f:280c:: with SMTP id o12mr5129871vko.92.1592515892795; Thu, 18 Jun 2020 14:31:32 -0700 (PDT) MIME-Version: 1.0 References: <20200610151818.1.I666ecd9c6f3c6405bd75831a21001b8109b6438c@changeid> <20200611110301.GA132747@google.com> <20200612092454.GA94228@google.com> <20200612123448.fcmzv3rdtsbawmpd@e107158-lin.cambridge.arm.com> In-Reply-To: <20200612123448.fcmzv3rdtsbawmpd@e107158-lin.cambridge.arm.com> From: Doug Anderson Date: Thu, 18 Jun 2020 14:31:21 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq To: Qais Yousef Cc: Quentin Perret , Benson Leung , Enric Balletbo i Serra , hsinyi@chromium.org, Joel Fernandes , Peter Zijlstra , Nicolas Boichat , Gwendal Grignou , ctheegal@codeaurora.org, Guenter Roeck , LKML 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 Hi, On Fri, Jun 12, 2020 at 5:34 AM Qais Yousef wrote: > > On 06/12/20 10:24, Quentin Perret wrote: > > +CC Qais [FYI] > > Thanks for the CC. > > > > > On Thursday 11 Jun 2020 at 10:48:40 (-0700), Doug Anderson wrote: > > > Hrm. I guess my first instinct is to say that we still want this > > > patch even if we have something that is applied more globally. > > > > Fair enough. > > > > > Specifically it sounds as if the patch you point at is suggesting that > > > we'd tweak the boost value to something other than max but we'd still > > > have a boost value. In the case of cros_ec_spi I don't believe we > > > need any boost value at all, so my patch would still be useful. The > > > computational needs of cros_ec_spi are very modest and it can do its > > > work at lower CPU frequencies just fine. It just can't be interrupted > > > for large swaths of time. > > > > > > > > > > IOW, how do you feel about 20200511154053.7822-1-qais.yousef@arm.com ? > > > > > > I'm not totally a fan, but I'm definitely not an expert in this area > > > (I've also only read the patch description and not the patch or the > > > whole thread). I really don't want yet another value that I need to > > > tune from board to board. Even worse, this tuning value isn't > > > board-specific but a combination of board and software specific. By > > > this, I'd imagine a scenario where you're using a real-time task to > > > get audio decoding done within a certain latency. I guess you'd tune > > > this value to make sure that you can get all your audio decoding done > > > in time but also not burn extra power. Now, imagine that the OS > > > upgrades and the audio task suddenly has to decode more complex > > > streams. You've got to go across all of your boards and re-tune every > > > one? ...or, nobody thinks about it and older boards start getting > > > stuttery audio? Perhaps the opposite happens and someone comes up > > > with a newer lower-cpu-intensive codec and you could save power. > > > Sounds like a bit of a nightmare. > > Generally I would expect this global tunable to be part of a vendor's SoC BSP. I think I'm coming at this from a very different world than the one you're thinking of. The concept of a BSP makes me think of a SoC vendor providing a drop of Linux with all their own weird hacks in it that only ever works on that one SoC and will never, ever, ever be updated. 5 years down the road if a software update is needed (security fix?) some poor soul will be in charge of tracking down the exact ancient code base that was used to build the original kernel, making the tweak, and building a new kernel. ;-) In the world of Chrome OS we try very very hard to build everything from a clean code base and are trying hard to stay even closer to upstream and away from per-device weirdness... > People tend to think of the flagship SoCs which are powerful, but if you > consider the low and medium end devices there's a massive spectrum over there > that this range is trying to cover. Yeah, perhaps you're right. When thinking about a laptop it's almost always a fairly powerful device and things could certainly be different for very low end chips trying to run Linux. > I would expect older boards init script to be separate for newer boards init > script. The OS by default boosts all RT tasks unless a platform specific script > overrides that. So I can't see how an OS upgrade would affect older boards. In the Chrome OS world I'm part of, the people supporting the boards are not always the people adding new whizbang features. We get new versions of the OS every 6 weeks and those new versions may change the way things work pretty significantly. We ship those new versions off to all boards. Certainly they undergo testing, but there are a lot of boards and if something is not tuned as well as it was when the device first shipped it's likely nobody will really notice. This is my bias against needing per-board tuning. > This knob still allows you to disable the max boosting and use the per-task > uclamp interface to boost only those tasks you care about. AFAIK this is > already done in a hacky way in android devices via special vendors provisions. Yeah. I don't think I have enough skin in the game to really say one way or the other what the API should be so I'll probably stay off the other, bigger thread and let others decide what the best API should be. For Chrome OS I'd probably advocate just disabling the default boost but even there I'd be willing to defer to the folks doing the actual work. -Doug