Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752581AbbERVSw (ORCPT ); Mon, 18 May 2015 17:18:52 -0400 Received: from mail-ob0-f169.google.com ([209.85.214.169]:34320 "EHLO mail-ob0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751059AbbERVSu (ORCPT ); Mon, 18 May 2015 17:18:50 -0400 MIME-Version: 1.0 In-Reply-To: <20150515160716.GY21418@twins.programming.kicks-ass.net> References: <1431647748-13221-1-git-send-email-kandoiruchi@google.com> <1431647748-13221-3-git-send-email-kandoiruchi@google.com> <20150515160716.GY21418@twins.programming.kicks-ass.net> Date: Mon, 18 May 2015 14:18:49 -0700 Message-ID: Subject: Re: [PATCH 2/2] sched: cpufreq: Adds a field cpu_power in the task_struct From: Ruchi Kandoi To: Peter Zijlstra Cc: "Rafael J. Wysocki" , Viresh Kumar , Ingo Molnar , Andrew Morton , Oleg Nesterov , "Kirill A. Shutemov" , Vladimir Davydov , Heinrich Schuchardt , Thomas Gleixner , Kees Cook , Konstantin Khlebnikov , Davidlohr Bueso , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1712 Lines: 36 On Fri, May 15, 2015 at 9:07 AM, Peter Zijlstra wrote: > > On Thu, May 14, 2015 at 04:55:48PM -0700, Ruchi Kandoi wrote: > > cpu_power has been added to keep track of amount of power each task is > > consuming. cpu_power is updated whenever stime and utime are updated for > > a task. power is computed by taking into account the frequency at which > > the current core was running and the current for cpu actively > > running at hat frequency. > > > > Both you patches completely lack any reason for me to even start > considering this. > > _WHY_ and _what_ are you doing? We need a mechanism in which we can get information about how much cpu power each of the process(which is then aggregated fro each uid/application) is consuming. In the current architecture, it is based on the amount of the time the process ran. This brings in inaccuracy because running x seconds at low frequency will have different power consumption as compared to running at the higher frequency. With these changes we have the information about the power which is not only dependent on the time it was running but also takes into account the frequency it was running at as well as the CPU # it was running at. Because the cost of running at different CPUs at the same frequency is different. This gives a better overview of the current power state of the system wrt cpu power. Please let me know if more information is required for the same. Thanks, Ruchi Kandoi -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/