lkml.org 
[lkml]   [2019]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH v8 2/3] proc: add AVX-512 usage elapsed time to /proc/pid/status
On Fri, 18 Jan 2019, Aubrey Li wrote:

> Subject: proc: add AVX-512 usage elapsed time to /proc/pid/status

Well, no. This should be split into two patches:

#1 proc/status: Add support for architecture specific output

#2 x86/proc/status: Add AVX-512 usage time

> +/*
> + * Report the amount of time elapsed in millisecond since last AVX512
> + * use in the task.
> + */
> +void avx512_state(struct seq_file *m, struct task_struct *task)
> +{
> + unsigned long timestamp = task->thread.fpu.avx512_timestamp;
> + long delta;
> +
> + if (!timestamp)
> + delta = -1;
> + else {

Still lacks curly brackets around the if () clause

> diff --git a/fs/proc/array.c b/fs/proc/array.c
> index 0ceb3b6b37e7..dd88c2219f08 100644
> --- a/fs/proc/array.c
> +++ b/fs/proc/array.c
> @@ -392,6 +392,10 @@ static inline void task_core_dumping(struct seq_file *m, struct mm_struct *mm)
> seq_putc(m, '\n');
> }

> +void __weak arch_task_state(struct seq_file *m, struct task_struct *task)

Still lacks a function prototype in the appropriate header file and please
rename it to something which makes it clear what this is
about. arch_proc_pid_status() or something like that.

Thanks,

tglx

\
 
 \ /
  Last update: 2019-02-11 14:27    [W:0.054 / U:0.240 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site