[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2229f120-cb11-8f8e-f27d-eabc94457cd5@linux.intel.com>
Date: Tue, 13 Nov 2018 21:06:47 +0800
From: "Li, Aubrey" <aubrey.li@...ux.intel.com>
To: David Laight <David.Laight@...LAB.COM>,
Thomas Gleixner <tglx@...utronix.de>,
Aubrey Li <aubrey.li@...el.com>
Cc: "mingo@...hat.com" <mingo@...hat.com>,
"peterz@...radead.org" <peterz@...radead.org>,
"hpa@...or.com" <hpa@...or.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"tim.c.chen@...ux.intel.com" <tim.c.chen@...ux.intel.com>,
"arjan@...ux.intel.com" <arjan@...ux.intel.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [RFC PATCH v2 1/2] x86/fpu: detect AVX task
On 2018/11/13 18:25, David Laight wrote:
> From: Li, Aubrey
>> Sent: 12 November 2018 01:41
> ...
>> VZEROUPPER instruction resets the init state. If context switch happens
>> to occur exactly after VZEROUPPER instruction, XINUSE bitmap is empty(all
>> zeros), which indicates the task is not using AVX. That's why the state
>> decay count is used here.
>
> Isn't there an obvious optimisation to execute VZEROALL during system call
> entry?
I'm not aware of this in the kernel, maybe you are talking about some
optimization in glibc?
> If that is done does any of this actually work?
The bitmap is checked during context switch, not system call entry.
Also, the flag is turned on immediately once it's detected, but requires 3
*consecutive* context switches with no usage to clear. So it could filter
most jitter patterns out.
I measured tensorflow(with AVX512), linpack(with AVX512) and a micro
benchmark, this works properly.
If you have a AVX512 workload, I'd like to know if this works for it.
Thanks,
-Aubrey
>
> David
>
>
> -
> Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
> Registration No: 1397386 (Wales)
>
Powered by blists - more mailing lists