Re: [RFC PATCH v1 2/2] proc: add /proc/<pid>/thread_state
From: Peter Zijlstra
Date: Thu Nov 08 2018 - 05:17:42 EST
On Thu, Nov 08, 2018 at 07:32:46AM +0100, Ingo Molnar wrote:
>
> * Aubrey Li <aubrey.li@xxxxxxxxx> wrote:
>
> > Expose the per-task cpu specific thread state value, it's helpful
> > for userland to classify and schedule the tasks by different policies
>
> That's pretty vague - what exactly would use this information? I'm sure
> you have a usecase in mind - could you please describe it?
Yeah, "thread_state" is a pretty terrible name for this. The use-case is
detectoring which tasks use AVX3 such that a userspace component (think
job scheduler) can cluster them together.
The 'problem' is that running AVX2+ code drops the max clock, because
you light up the massive wide (and thus large area) paths.
So maybe something like "simd_active" is a better name, dunno.
Or maybe "simd_class" and we can write out 0,1,2,3 depending on the AVX
class being used, dunno. It might make sense to look at what other arch
SIMD stuff looks like to form this interface.