[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b869aa99-02e7-961d-829c-bf275023e06e@intel.com>
Date: Thu, 15 Nov 2018 07:18:18 -0800
From: Dave Hansen <dave.hansen@...el.com>
To: Aubrey Li <aubrey.li@...el.com>, tglx@...utronix.de,
mingo@...hat.com, peterz@...radead.org, hpa@...or.com
Cc: ak@...ux.intel.com, tim.c.chen@...ux.intel.com,
arjan@...ux.intel.com, linux-kernel@...r.kernel.org,
Aubrey Li <aubrey.li@...ux.intel.com>
Subject: Re: [PATCH v3 2/2] proc: add /proc/<pid>/arch_state
On 11/14/18 3:00 PM, Aubrey Li wrote:
> +void arch_thread_state(struct seq_file *m, struct task_struct *task)
> +{
> + /*
> + * Report AVX-512 Hi16_ZMM registers usage
> + */
> + if (task->thread.fpu.hi16zmm_usage)
> + seq_putc(m, '1');
> + else
> + seq_putc(m, '0');
> + seq_putc(m, '\n');
> +}
Am I reading this right that this file just dumps out a plain 0 or 1
based on the internal kernel state? BTW, there's no example of the
output in the changelog, so it's rather hard to tell if my guess is
right. (Hint, hint).
If so, I'd really prefer you not do this. We have /proc/$pid/stat to
stand as a disaster in this regard. It is essentially
non-human-readable gibberish because it's impossible to tell what the
values mean without a decoder ring.
If we go down this road, we need a file along the lines of
/proc/$pid/status.
But, either way, this is a new ABI that we need to consider carefully.
It needs documentation. For instance, will this really mean "Hi16_ZMM
user" from now until the end of time? Or, does it just mean "group me
with other tasks that have this bit set"?
Powered by blists - more mailing lists