Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1400687 > unrolled thread
| Started by | Zhao Lei <zhaolei@cn.fujitsu.com> |
|---|---|
| First post | 2016-05-13 12:30 +0200 |
| Last post | 2016-05-17 10:40 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2 0/3] cpuacct: Show all detail stats in one file Zhao Lei <zhaolei@cn.fujitsu.com> - 2016-05-13 12:30 +0200
Re: [PATCH v2 0/3] cpuacct: Show all detail stats in one file Ingo Molnar <mingo@kernel.org> - 2016-05-17 10:40 +0200
| From | Zhao Lei <zhaolei@cn.fujitsu.com> |
|---|---|
| Date | 2016-05-13 12:30 +0200 |
| Subject | [PATCH v2 0/3] cpuacct: Show all detail stats in one file |
| Message-ID | <ryiw2-1pE-9@gated-at.bofh.it> |
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.
Changelog v1->v2:
1: Rewrite subject and changelog to fix typos and
make it more accurate.
2: Use a variable for the cpustat array itself to make
code clean(avoid lot of 'kcpustat->').
3: Add missed newline between variable definitions and
the first non-definition C statement.
Above are suggested by: Ingo Molnar <mingo.kernel.org@gmail.com>
4: Remove '[]' in CPUID, to make it easier to parse.
Suggested by: Peter Zijlstra <peterz@infradead.org>
Zhao Lei (3):
cpuacct: Merge cpuacct_usage_index and cpuacct_stat_index
cpuacct: Use loop to avoid copies of the similar code in
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
[toc] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2016-05-17 10:40 +0200 |
| Message-ID | <rzIHL-2dn-7@gated-at.bofh.it> |
| In reply to | #1400687 |
* Zhao Lei <zhaolei@cn.fujitsu.com> wrote:
> 1: Rewrite subject and changelog to fix typos and
> make it more accurate.
So this is really annoying. In the previous review I suggested this:
" - please fix the title of the patch: have a look at 'git log
kernel/sched/cpuacct.c' how recent titles to that code look like. "
If you do what I suggested, you see this title:
sched/cpuacct: Check for NULL when using task_pt_regs()
Yet you continued to submit using the tag I complained about:
cpuacct: Show all detail stats in one file
Yes, it's a small detail that I could fix up, but this kind of inability to read
very plain suggestions worries me.
And yes, if I look further, I see further signs of lack of care:
In current code, we can get cpuacct data from severial files,
severial? How about at least running a spell checker over the text?
... and I haven't even looked at the code.
Thanks,
Ingo
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web