Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp4611140ioa; Wed, 27 Apr 2022 07:27:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyitoa4UlzC+JImr7SLosdvIPanKsQrha/PXBMjiNwx7pq3N/rWjx5zLeeA2tnsMCWhBF8J X-Received: by 2002:a17:902:6ac9:b0:156:a6ae:8806 with SMTP id i9-20020a1709026ac900b00156a6ae8806mr28588268plt.148.1651069655845; Wed, 27 Apr 2022 07:27:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651069655; cv=none; d=google.com; s=arc-20160816; b=oV+MeKnaobvBM7A/CU8vlznZXbZN6P7V7DRqTisNXQoqQMI72+N2p5PdI2Z6Xu30Vl 07pd2eb3vNYNZoEZBaqZAyGKmLPmkA87eTJki0RWMRfI/u/I4eLYemJHeju8BlTY7Ybf /PE+iOV1BkYPy/YqM3C/328ruovZaVeBSOKbR8MUDWHEpbnwhg6shv/f0YSFpPmvLfV8 7D9Wki7XrhxCqRhngvv+BxcC2s74rrTofqLA8Y2hNECxo/dFVIttomrcA9h16ooDPE6Q OuzzqyH7v7N3iTse1QVokuQRmxiD46ei4W2xbsD5ZfTVUR61TH6H68T+P+7MEYKWkz/T H+vQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=dU913bXjCZZ8OZ0r2bm/9a3Osp93mZqfTqcdPdli4q0=; b=qaVfGwxpacUTbKL5pwpyxS8vCGVBWKNasESeIRRrS1rChNDYa5D+nuzE5XuT30ANVS O5iQYwdiIrxlXszdwcqjOgF+D3nMtW003gpbN/2l/oOiSOizJNoz1LT2lvv0NbuJYh6N FRAwK1lko5sWhji/I2WuSaqtdr813d3cAlg45DVc+agrglVpDOtwlJr8zHaVTT0NgLDg M2ScLnN1TTWBAqE0zXcgy1CX9U1minV63L65ZPeg5pNbdJMkIzBoZJmrMBJuEIhurt2c m8tSk5YCHaRWDGWtk88u0hMdVKxZfIFJIkZrmB45qYH2c8/s7E24goQmceZaPSyLdPFx jX/w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id v38-20020a634826000000b0039d68b7a67asi1655698pga.843.2022.04.27.07.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Apr 2022 07:27:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 312D3457BD; Wed, 27 Apr 2022 06:59:05 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237020AbiD0OCG (ORCPT + 99 others); Wed, 27 Apr 2022 10:02:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236906AbiD0OCE (ORCPT ); Wed, 27 Apr 2022 10:02:04 -0400 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4C894457A7; Wed, 27 Apr 2022 06:58:27 -0700 (PDT) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 19431ED1; Wed, 27 Apr 2022 06:58:11 -0700 (PDT) Received: from [10.57.7.196] (unknown [10.57.7.196]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 62E013F5A1; Wed, 27 Apr 2022 06:58:09 -0700 (PDT) Message-ID: Date: Wed, 27 Apr 2022 14:58:07 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [RFC PATCH v3 2/5] cpuidle: Add Cpufreq Active Stats calls tracking idle entry/exit Content-Language: en-US To: Artem Bityutskiy Cc: dietmar.eggemann@arm.com, viresh.kumar@linaro.org, rafael@kernel.org, daniel.lezcano@linaro.org, amitk@kernel.org, rui.zhang@intel.com, amit.kachhap@gmail.com, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220406220809.22555-1-lukasz.luba@arm.com> <20220406220809.22555-3-lukasz.luba@arm.com> <97e7e3f5110702fab727b4df7d53511aef5c60b1.camel@gmail.com> <36852629-f803-5ac9-bef5-bcfae3ed947d@arm.com> <47cbbe94b061d8d7b7c222a42fa80b7b4cd4b7e5.camel@gmail.com> From: Lukasz Luba In-Reply-To: <47cbbe94b061d8d7b7c222a42fa80b7b4cd4b7e5.camel@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A, RDNS_NONE,SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 4/26/22 17:29, Artem Bityutskiy wrote: > On Tue, 2022-04-26 at 16:01 +0100, Lukasz Luba wrote: >>> I am worried about adding more stuff here. >>> >>> Please, consider getting the stats after interrupts are re-enabled. You may >>> lose >>> some "precision" because of that, but it is probably overall better that >>> adding >>> to idle interrupt latency. >> >> Definitely. I don't need such precision, so later when interrupts are >> re-enabled is OK for me. > > Thanks. That is preferable in general: we do not do things with interrupts > disabled unless there is a very good reason to. > >> >> This new call might be empty for your x86 kernels, since probably >> you set the CONFIG_CPU_FREQ_STAT.I can add additional config >> so platforms might still have CONFIG_CPU_FREQ_STAT but avoid this >> new feature and additional overhead in idle exit when e.g. >> CONFIG_CPU_FREQ_ACTIVE_STAT is not set. >> >> The x86 platforms won't use IPA governor, so it's reasonable to >> do this way. >> >> Does this sounds good? > > I did not thoroughly read your patches so can't comment on the details. > > Just pointing that in general idle path is to be considered the critical path, > especially the part before interrupts are re-enabled. Not only on x86, > but on all platforms using cpuidle. This does not mean we can't read more > statistics there, but it does mean that we should be very careful about added > overhead, keep it under control, etc. I totally agree with you. I didn't know that the interrupts were not enabled at that moment. I'll address it. Regards, Lukasz