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=-5.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham 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 51992CA9EC5 for ; Wed, 30 Oct 2019 19:18:28 +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 15177204FD for ; Wed, 30 Oct 2019 19:18:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="beiy2lsi"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=chromium.org header.i=@chromium.org header.b="L2CD3ce3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15177204FD Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org 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:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=6x36IkfweTMWb9FN1pRtLxjjdtlg8rb4X759bOkf/ks=; b=beiy2lsi1OnQc1 rVnpSLvV5IxE6J4m9AX2Vewd1WEiAAqbrJu+XTweNPcTX06039xh9KyPPJb/A08e9AGvCh6uXHAKz CY2AGrS3l8zkGUQXDFiaPKUZs2qJhAVOhu55nCC7Ckgra9uaKAoU3X4BMhecnwFXh3/+95ffgD+Ds B/HnfC6z2Wm6AJJQ0sKyLzKp1OeMQPsPR1cSR1DZjUevgFvMLBB64DksVSBLGW1sA0mpfoxZha1gh mssQag1kT6O8SrvRr2jLQBh7OOy0bU+9DrKBdpf4ZMCTDpLCNGa0jqCkvzpPWHJJ3sFLcww1p3slt 80bPTrQv9An9ISbAfcSg==; 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 1iPtUA-0006bo-4f; Wed, 30 Oct 2019 19:18:26 +0000 Received: from mail-pl1-x644.google.com ([2607:f8b0:4864:20::644]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1iPtU6-0006bH-A2 for linux-arm-kernel@lists.infradead.org; Wed, 30 Oct 2019 19:18:23 +0000 Received: by mail-pl1-x644.google.com with SMTP id p13so1421921pll.4 for ; Wed, 30 Oct 2019 12:18:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=2OlkZ0fbcuhFnCC06vBucpby6j2rTDvW/LLqNAsLplQ=; b=L2CD3ce3d2ob0TvHZzIn6TzM2d4+RIlDTsEZL5nV9u8YgBB2f8vbP+XZjWtLXbFiiC +oMuwq2U7SWqrBMsyJtJdlzoG3ZuYzS3daVtslG/Vj2Vn70eYQ5t5MSaXSF8JC6XbQ/p IzOhi544QFjXbAhDSScXE5zO3SR8mcfLOMhGg= 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:user-agent; bh=2OlkZ0fbcuhFnCC06vBucpby6j2rTDvW/LLqNAsLplQ=; b=hH9Qiv/OI4D1eAcAOgkDdTonHJdCv2oTI55sTREqlwv3JawcGA/EVpA5m6E7NzbnxG T9wkSwo6ym9i8uC5KcD4Y+TF5c7h7NvTssj0ifQi5FHo4OQ3GjsmSJJbWsv/NITHhd7l GNPTZhULmKwADKVmZ7mI2QYACY6Cwz5y9TRS1Lf8lLEJa1MMZjY8EVrmGNfCiDsVR/Md R8b7dOXlyw8pOLnIdLB+ornlZBFgjCCQDHVKJ8UMBooRnuTxf92hq1vHJULqhQSXmueu W0hqH4W2VgSFJa9U4eL0bDQ+IflJz2VMqZPC2GzUq89HgkxvNp2cKK+kN3sDRcWNK75z XbDg== X-Gm-Message-State: APjAAAUeXrIMHHrp9irhVJ4aFQ+NhpQ4Etx0NSOjL5i/q7PihUbuT5vk 0FvPopG58wvfAnqHkcg947oK0MjLKdw= X-Google-Smtp-Source: APXvYqx4N2VLKcKkoi0hP0tFPhHeamd6/J7d2dmaS7igYbxnjmiCmAT3z1euOVcdNEw9NpujQQVijQ== X-Received: by 2002:a17:902:547:: with SMTP id 65mr1671958plf.239.1572463101315; Wed, 30 Oct 2019 12:18:21 -0700 (PDT) Received: from localhost ([2620:15c:202:1:4fff:7a6b:a335:8fde]) by smtp.gmail.com with ESMTPSA id h9sm705436pfn.167.2019.10.30.12.18.20 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 30 Oct 2019 12:18:20 -0700 (PDT) Date: Wed, 30 Oct 2019 12:18:19 -0700 From: Matthias Kaehlcke To: Leonard Crestez Subject: Re: [PATCH] cpufreq: Add user_min/max_freq Message-ID: <20191030191819.GB27773@google.com> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20191030_121822_349509_BBE88640 X-CRM114-Status: GOOD ( 13.60 ) 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: Ulf Hansson , Saravana Kannan , linux-pm@vger.kernel.org, Viresh Kumar , "Rafael J. Wysocki" , Chanwoo Choi , Kyungmin Park , MyungJoo Ham , linux-arm-kernel@lists.infradead.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 Wed, Oct 30, 2019 at 02:41:49AM +0200, Leonard Crestez wrote: > Current values in scaling_min_freq and scaling_max freq can change on > the fly due to event such as thermal monitoring. This behavior is > confusing for userspace and because once an userspace limit is written > to scaling_min/max_freq it is not possible to read it back. Yes, this is indeed confusing. > Introduce two new user_min/max_freq files which only contain the limits > imposed by userspace, without any aggregation. > > Signed-off-by: Leonard Crestez > > --- > This was motivated by these discussions: > > * https://patchwork.kernel.org/patch/11078475/#22805379 > * https://patchwork.kernel.org/patch/11171817/#22917099 > > Those threads are about devfreq but same issue applies to cpufreq as > well. Let me know if this solution seems reasonable? > > An alternative would be to make scaling_min/max_freq always read back > the configured value and introduce new effective_min/max_freq files for > the aggregate values. That might break existing users (though I'm not > familiar with any). It seems there isn't really a perfect solution :( This change creates a set of new, consistent attributes, but since we can't make the current min/max attributes read-only userspace will keep using them forever. It's somewhat doubtful that userspace can do anything useful with the current min/max values, since they might change just after being read. Anything besides monitoring the limits (approximately) would be inherently broken. Having min/max return the configured value would be the expected behavior (IMO), but obviously I also don't know for sure if there are userspace components relying on the current behavior. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel