Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-19 Thread Thomas Gleixner
On Wed, 19 Dec 2018, Li, Aubrey wrote: > On 2018/12/19 5:38, Andi Kleen wrote: > >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically > >> 32bit > >> kernel can use AVX512, but not sure if anyone use it like this. > >> get_jiffies_64() > >> includes jiffies_lock ops so not

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/19 5:38, Andi Kleen wrote: >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically >> 32bit >> kernel can use AVX512, but not sure if anyone use it like this. >> get_jiffies_64() >> includes jiffies_lock ops so not good in context switch. So I want to use raw >>

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/19 1:14, Dave Hansen wrote: > On 12/18/18 7:32 AM, Thomas Gleixner wrote: >> What exactly prevents a 32bit kernel from having the AVX512 feature bit >> set? And if it cannot be set on 32bit, then why are you compiling that code >> in at all? > > There are three different AVX-512 states

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Andi Kleen
On Tue, Dec 18, 2018 at 01:44:41PM -0800, Dave Hansen wrote: > On 12/18/18 1:38 PM, Andi Kleen wrote: > >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically > >> 32bit > >> kernel can use AVX512, but not sure if anyone use it like this. > >> get_jiffies_64() > >> includes

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Dave Hansen
On 12/18/18 1:38 PM, Andi Kleen wrote: >> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically >> 32bit >> kernel can use AVX512, but not sure if anyone use it like this. >> get_jiffies_64() >> includes jiffies_lock ops so not good in context switch. So I want to use raw >>

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Andi Kleen
> I misunderstood, you mean 32bit kernel, not 32bit machine. Theoretically 32bit > kernel can use AVX512, but not sure if anyone use it like this. > get_jiffies_64() > includes jiffies_lock ops so not good in context switch. So I want to use raw > jiffies_64 here. jiffies is a good candidate but

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Dave Hansen
On 12/18/18 7:32 AM, Thomas Gleixner wrote: > What exactly prevents a 32bit kernel from having the AVX512 feature bit > set? And if it cannot be set on 32bit, then why are you compiling that code > in at all? There are three different AVX-512 states (and three bits) which Aubrey's patch checks.

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/18 23:32, Thomas Gleixner wrote: > On Tue, 18 Dec 2018, Li, Aubrey wrote: > >> On 2018/12/18 22:14, Thomas Gleixner wrote: >>> On Tue, 18 Dec 2018, Aubrey Li wrote: diff --git a/arch/x86/include/asm/fpu/internal.h b/arch/x86/include/asm/fpu/internal.h index

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Thomas Gleixner
On Tue, 18 Dec 2018, Li, Aubrey wrote: > On 2018/12/18 22:14, Thomas Gleixner wrote: > > On Tue, 18 Dec 2018, Aubrey Li wrote: > >> diff --git a/arch/x86/include/asm/fpu/internal.h > >> b/arch/x86/include/asm/fpu/internal.h > >> index a38bf5a1e37a..8778ac172255 100644 > >> ---

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Li, Aubrey
On 2018/12/18 22:14, Thomas Gleixner wrote: > On Tue, 18 Dec 2018, Aubrey Li wrote: >> diff --git a/arch/x86/include/asm/fpu/internal.h >> b/arch/x86/include/asm/fpu/internal.h >> index a38bf5a1e37a..8778ac172255 100644 >> --- a/arch/x86/include/asm/fpu/internal.h >> +++

Re: [PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Thomas Gleixner
On Tue, 18 Dec 2018, Aubrey Li wrote: > diff --git a/arch/x86/include/asm/fpu/internal.h > b/arch/x86/include/asm/fpu/internal.h > index a38bf5a1e37a..8778ac172255 100644 > --- a/arch/x86/include/asm/fpu/internal.h > +++ b/arch/x86/include/asm/fpu/internal.h > @@ -411,6 +411,13 @@ static inline

[PATCH v6 1/3] x86/fpu: track AVX-512 usage of tasks

2018-12-18 Thread Aubrey Li
User space tools which do automated task placement need information about AVX-512 usage of tasks, because AVX-512 usage could cause core turbo frequency drop and impact the running task on the sibling CPU. The XSAVE hardware structure has bits that indicate when valid state is present in