Received: by 2002:a25:683:0:0:0:0:0 with SMTP id 125csp322866ybg; Fri, 12 Jun 2020 02:28:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyDgvQZ858DrUkvl17YT1Nm4S9UiaiOeT5Xsk1q7t8fwrCEoiTxIByEfHs2ld5DHDEaAr9D X-Received: by 2002:a05:6402:3c2:: with SMTP id t2mr10769971edw.361.1591954091625; Fri, 12 Jun 2020 02:28:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591954091; cv=none; d=google.com; s=arc-20160816; b=AO/8Uq7gptuUa2B85R3klGbKUDszlakj7JaxhHqz5N8ZSdsfwJuUC4/Fi/KumvlaMl R01DxSIUAF/KGHFqUHGlVfFoIjKtN9lbjD9vyi821CTux5VYSkvIqkIHkEMFdXBL4B3t To7GLXmyi1h7zoYV/DsQhPDm1ceF4AUgeHoFg8f1FAo1N1QFQrlOZNlR8l2PA9B52oZ0 wKhetC2TBupUjSjNaIRTcxtXe9sxygS7nRL9O++Nw4Hepj94UmoF3usZNVeEi0fUJ0qX uDgQ7F1h+QbBzHQ2bMR7d2Hgctk7+2l81QaGPmHVrRGCEPDjhVLLCa4wkbW/JoIj3b/e wCug== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=NIO9UrjV3PHuFBsYgnQeDXYIPOYXUBbjknG+ILWYaCA=; b=1I3gNXTzKdyNhx2zdOZ0hjHudL9Tz2qTz8plOWCWF4auFuJV9o/FSMuicgpBu7JY9G MyKvNLCPLxJoDpGyLMHwsomCyiOIJ3AMugI3IXmfIyFmcfBBcxGOKBTlyFq3e9XLuq86 moNK8Qt98OuU/OXH3S64u6gxBV0rOKB/gof7hVLzVsEDrr1olbMJutAAqNCanft5gg62 zkHcHOGHQn5nIJSyDJ9tfaPCsE/b92lluDVccuydq8XFbSqU8BLD2vw3S3krB+SQCSxS 0oEGlbv4XGej51YcgGGkUvrIzbR+GsqrSmBAQeYmh1bl9+H9WwKONhYhUekTaGgZGlJn Hu7Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=O4nP7v7b; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dp9si4581430ejc.698.2020.06.12.02.27.48; Fri, 12 Jun 2020 02:28:11 -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=@google.com header.s=20161025 header.b=O4nP7v7b; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726519AbgFLJZB (ORCPT + 99 others); Fri, 12 Jun 2020 05:25:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37160 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726343AbgFLJZA (ORCPT ); Fri, 12 Jun 2020 05:25:00 -0400 Received: from mail-wr1-x443.google.com (mail-wr1-x443.google.com [IPv6:2a00:1450:4864:20::443]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E3B0C03E96F for ; Fri, 12 Jun 2020 02:25:00 -0700 (PDT) Received: by mail-wr1-x443.google.com with SMTP id h5so9014377wrc.7 for ; Fri, 12 Jun 2020 02:24:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=NIO9UrjV3PHuFBsYgnQeDXYIPOYXUBbjknG+ILWYaCA=; b=O4nP7v7bSFuN+S78LBZPLJYv7jhujTRoFyuIPCXwniTgyrKpxgciGezh5flwTJE1Pk 0EFgGn5B4w4DIzCtSqZdcnWGxOaqUM2EIS1ud6h2q4xzsCB+xi935Sg6TiqlewCKmWx3 i7tnaLevovWOe3BeTtk8q8YnNS6axl7pEo+S7KWhGJUpJV3g/OTYFYhXJBubvlz8UbYt JsyMiMMKZlOtrySSweL7DNX8DsrxGpYGIu2Sw86kIWniFy9BXFGrnPCLWDISxtcvT/Go PKX5p6UB5SNSK8snYAgk2YmPt3LppOygwZWXWHTR2Qw/9EREwgqjoAQuOxuKHR3uFnEy L53w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=NIO9UrjV3PHuFBsYgnQeDXYIPOYXUBbjknG+ILWYaCA=; b=ldSKLHCEJUskLU3Vn/HQM/lifmvj69LMLK6Xvu20JWqJcdVjd0NmmPMUPVXfhMKVqd OaynJSRgbqmX10D+xPx8lXqMP52/Mp5Z1LKKjd1p3hicYhEpQuvXZe+FAxTMyzY30/PV IOAh8wCatWfiE87gB7g8n7DpVPbIdkchSg/CyunIaAerXTwWutqVLTNK+sBnZmT8s0bz 9M0VeDGTikY86vCzdk34e0EzZuXg04qRHG0P4b8EsyOiFRYdRTuaiqwWEpxjhh13bymU j0Eoq/GRuirivam3cJ8n9g8uuk+FXBtbN2z4lFPCf9vkf2H3IrEHayc8LWQ2kYVDnPRW VvVg== X-Gm-Message-State: AOAM5319nPEgLyDRzXer4pawqlLE3okR0oqPrQdOA00o7JgXvxTASpct aAOV3VJHZGtPFmaEII4CHhxh0Q== X-Received: by 2002:a5d:500c:: with SMTP id e12mr14121614wrt.359.1591953898389; Fri, 12 Jun 2020 02:24:58 -0700 (PDT) Received: from google.com ([2a00:79e0:d:110:d6cc:2030:37c1:9964]) by smtp.gmail.com with ESMTPSA id k64sm8190943wmf.34.2020.06.12.02.24.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 Jun 2020 02:24:57 -0700 (PDT) Date: Fri, 12 Jun 2020 10:24:54 +0100 From: Quentin Perret To: Doug Anderson Cc: Benson Leung , Enric Balletbo i Serra , hsinyi@chromium.org, Joel Fernandes , Peter Zijlstra , Nicolas Boichat , Gwendal Grignou , ctheegal@codeaurora.org, Guenter Roeck , LKML , qais.yousef@arm.com Subject: Re: [PATCH] cros_ec_spi: Even though we're RT priority, don't bump cpu freq Message-ID: <20200612092454.GA94228@google.com> References: <20200610151818.1.I666ecd9c6f3c6405bd75831a21001b8109b6438c@changeid> <20200611110301.GA132747@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org +CC Qais [FYI] 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. > > I'd rather have a boolean value: boost all RT threads to max vs. don't > boost all RT threads to max. Someone that just wanted RT stuff to run > as fast as possible without any hassle on their system and didn't care > about power efficiency could turn this on. Anyone who really cared > about power could turn this off and then could find a more targeted > way to boost things, hopefully in a way that doesn't require tuning. > One option would be to still boost the CPU to max but only for certain > tasks known to be really latency sensitive. Another might be to > somehow measure whether or not the task is making its deadlines and > boost the CPU frequency up if deadlines are not being met. I'm sure > there are fancier ways. > > ...of course, I believe your patch allows me to do what I want: I can > just set the default boost to 0. It just leaves in the temptation for > others to require a default boost of something else and then I'm stuck > in my tuning nightmare. Right, so I am not disagreeing at all with the above. FWIW, I expect Android to set this default value to 0 as you mentioned, so that uclamp basically becomes 'opt-in' for _all_ tasks, including RT. Now, given that Qais' patch is commiting something to userspace, I think it makes sense to expose the full range rather than a boolean value, as it's probably more future-proof. That is, if we expose a boolean knob now, and somebody wants to be able to set a default value in the middle in a few years, we'll have to add another knob, and maintain both (which sucks). But it's just my personal opinion. Feel free to jump in the other thread if you feel differently :) Cheers, Quentin