Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp3516106pxv; Mon, 19 Jul 2021 02:02:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrfmsT6qNe70i77m+oQXGIQGKWtdWecMQJTYTKdSH+/wJalD4wwdAMzTUmgtp6a1SGudcT X-Received: by 2002:a05:6638:2416:: with SMTP id z22mr13948094jat.57.1626685373231; Mon, 19 Jul 2021 02:02:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626685373; cv=none; d=google.com; s=arc-20160816; b=h+SFxClaCZNIOm9MkuGPWtEPnY7SgqCAJI2YtvU2Gm4J1OlnNVxaEDzingoTMf4JSM 9YKngSO5h0LeTW4x8N8ULAUpfe7+jitV/s+i1ewV4eWj48CIXhCLZawBFMjhSRmBd4mX BeXLgyZzbi7PQcRBWz/Xb6Zg1jPakv+YwBnqVi4CeulHGbPygb4efME+HesWfkZh6r3j G7VkNWkPe+tXX5zk+rAFP8aun2gNzHYoVtFp9J8ioHIEdcUanHuXSv38ymMAcMfrQ0cs zgFFDO72rBKixIHKzYA/7Q5hMKr3eCulAHAgV0X/dFAxmQDHS3RzMa+1y0s1WdmvUtyx Xqlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=1O7dXwGdGT91ZZ7Z4/xxa2/7VSKJ78I+U+eMOl+W7yQ=; b=EMUgr3IAFQ7QesuxHUhFtSwxOK/4PKoUAjFMhthb44SWhmEIxMYhDx03h/3aTtKi3h ysusdZoqR/IODP4IswWcPIz6xhx7jL6S32lSp6K/TdeIkhDtpBagS8MuDBbrA5367O14 Knl3zXp+b3U+5To5MbQEGpBcjXm7lIaifCJmeH+EO8L9aF5PcZuhLKCC8MDCeLiHuPGK 5FelSCrcRFkh5EplRe3UhySCXGDe19ReG98+ejoW45vfkE3uZACwBU9bxqkFkza2WWYI lorlZhtCuJ2eS7C2A0n3/2/gXAoV6glmAhfL8XahjKK9Z3QXBdJCcBSzzpieVTz7U16p tw6g== 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id r20si18962958jan.108.2021.07.19.02.02.40; Mon, 19 Jul 2021 02:02:53 -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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235752AbhGSIUV (ORCPT + 99 others); Mon, 19 Jul 2021 04:20:21 -0400 Received: from foss.arm.com ([217.140.110.172]:53032 "EHLO foss.arm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235728AbhGSIUO (ORCPT ); Mon, 19 Jul 2021 04:20:14 -0400 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 2D8B06D; Mon, 19 Jul 2021 01:52:10 -0700 (PDT) Received: from [10.57.3.138] (unknown [10.57.3.138]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1E93D3F73D; Mon, 19 Jul 2021 01:52:07 -0700 (PDT) Subject: Re: [RFC PATCH v2 0/6] Introduce Active Stats framework with CPU performance statistics To: "Rafael J. Wysocki" Cc: Linux Kernel Mailing List , Daniel Lezcano , Linux PM , Amit Kucheria , "Zhang, Rui" , Dietmar Eggemann , Chris Redpath , Beata.Michalska@arm.com, Viresh Kumar , "Rafael J. Wysocki" , Amit Kachhap References: <20210706131828.22309-1-lukasz.luba@arm.com> <1de9d474-fdeb-8db6-0b01-53a90f7c20c8@arm.com> <4d4801c3-1d84-9754-815c-71a6412cf4f3@arm.com> From: Lukasz Luba Message-ID: Date: Mon, 19 Jul 2021 09:52:06 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 7/14/21 7:30 PM, Rafael J. Wysocki wrote: > Sorry for the delay. Thank you for coming back with comments. No worries, I've been on holidays last week :) [snip] >>>> >>>> I understand your concerns. If you have another idea than this framework >>>> I'm happy to hear it. Maybe better stats in cpuidle, which would be >>>> are of the cpufreq? >>> >>> One idea that I have is outlined above and I'm not seeing a reason to >>> put cpufreq statistics into cpuidle. >>> >> >> I'm happy to prepare such RFC if you like. > > Well, it should be quite clear that I would prefer this to the > original approach, if viable at all. :-) Sure, let me check if this approach is viable. I'll come back to you in next days... > >> I would just need a bit more information. > > OK For now I have only high level questions: 1. The stats data structures and related manageable code should live in the cpuidle and cpufreq just calls some API to notify about freq transition? (no split of data, code between these two frameworks) 2. The registration/allocation of these structures inside the cpuidle could be done using cpufreq_register_notifier() with notification mechanism? 3. CPU hotplug notification (which is needed for these stats) can be used inside the cpuidle (cpuhp_setup_state(CPUHP_AP_ONLINE_DYN,...))?