From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751784AbcEJRrE (ORCPT ); Tue, 10 May 2016 13:47:04 -0400 Received: from cn.fujitsu.com ([59.151.112.132]:63510 "EHLO heian.cn.fujitsu.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1751595AbcEJRrA (ORCPT ); Tue, 10 May 2016 13:47:00 -0400 X-IronPort-AV: E=Sophos;i="5.22,518,1449504000"; d="scan'208";a="6410421" From: Zhao Lei To: , Peter Zijlstra CC: Zhao Lei Subject: [PATCH 0/3] cpuacct: Show all detail stats in one file Date: Wed, 11 May 2016 01:43:13 +0800 Message-ID: X-Mailer: git-send-email 1.8.5.1 MIME-Version: 1.0 Content-Type: text/plain X-yoursite-MailScanner-ID: 19CCE42B66E2.A5AE2 X-yoursite-MailScanner: Found to be clean X-yoursite-MailScanner-From: zhaolei@cn.fujitsu.com Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In current code, we can get cpuacct data from severial files, but each file have its lilmit. For example: we can get cpu usage in user and kernel mode by cpuacct.stat, but we can't get detail data of each cpu in above file. we can get each cpu's kernel mode usage in cpuacct.usage_percpu_sys, but we can't get user mode data in the same time. This patch introduce cpuacct.usage_all, to show all detailed cpu accounting data altogether: # cat cpuacct.usage_all [cpu] user system [0] 3809760299 5807968992 [1] 3250329855 454612211 .. Any aspects of statistics data can be get from this file with a simple data-processing code. This patchset should be applied on top of: sched/cpuacct: Check for NULL when using task_pt_regs() in tip tree. Commit-ID: bd92883051a0228cc34996b8e766111ba10c9aac Gitweb: http://git.kernel.org/tip/bd92883051a0228cc34996b8e766111ba10c9aac Author: Anton Blanchard AuthorDate: Wed, 6 Apr 2016 21:59:50 +1000 Committer: Ingo Molnar CommitDate: Wed, 13 Apr 2016 13:22:37 +0200 Zhao Lei (3): cpuacct: Merge cpuacct_usage_index and cpuacct_usage_index cpuacct: Simplify cpuacct_stats_show cpuacct: Show all detail stats in one file kernel/sched/cpuacct.c | 114 +++++++++++++++++++++++++++++++------------------ 1 file changed, 73 insertions(+), 41 deletions(-) -- 1.8.5.1