lkml.org 
[lkml]   [2019]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 2/4] numa: append per-node execution info in memory.numa_stat
On Wed, Jul 03, 2019 at 11:29:15AM +0800, 王贇 wrote:

> +++ b/include/linux/memcontrol.h
> @@ -190,6 +190,7 @@ enum memcg_numa_locality_interval {
>
> struct memcg_stat_numa {
> u64 locality[NR_NL_INTERVAL];
> + u64 exectime;

Maybe call the field jiffies, because that's what it counts.

> };
>
> #endif
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 2edf3f5ac4b9..d5f48365770f 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3575,6 +3575,18 @@ static int memcg_numa_stat_show(struct seq_file *m, void *v)
> seq_printf(m, " %u", jiffies_to_msecs(sum));
> }
> seq_putc(m, '\n');
> +
> + seq_puts(m, "exectime");
> + for_each_online_node(nr) {
> + int cpu;
> + u64 sum = 0;
> +
> + for_each_cpu(cpu, cpumask_of_node(nr))
> + sum += per_cpu(memcg->stat_numa->exectime, cpu);
> +
> + seq_printf(m, " %llu", jiffies_to_msecs(sum));
> + }
> + seq_putc(m, '\n');
> #endif
>
> return 0;

\
 
 \ /
  Last update: 2019-07-11 15:46    [W:0.248 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site