[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <c311789b-a6be-42c9-acfe-c1fdd9f4e3e1@intel.com>
Date: Mon, 27 Oct 2025 07:26:19 -0700
From: Dave Hansen <dave.hansen@...el.com>
To: chuang <nashuiliang@...il.com>, Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, open list <linux-kernel@...r.kernel.org>
Subject: Re: x86/fpu: Inaccurate AVX-512 Usage Tracking via arch_status
On 10/27/25 00:50, chuang wrote:
> On AVX-512 capable systems, the implementation appears to record the
> current timestamp into 'task->thread.fpu.avx512_timestamp' upon any
> task switch, irrespective of whether the task has actually executed an
> AVX-512 instruction.
The timestamp update ultimately has _zero_ to do with executing
AVX-512 instructions. It's all about the state in the ZMM registers, not
AVX-512 instructions.
Those registers are inherited at fork and I don't see avx512_timestamp
being zeroed anywhere. So I suspect what you are seeing is that some
_parent_ used AVX512, and its children are getting stuck with
avx512_timestamp.
You could probably confirm this by dumping ->avx512_timestamp in
fpu_clone().
Or, try the attached patch and see if it makes things work more like
you'd expect.
View attachment "avx512-ts-reset.patch" of type "text/x-patch" (467 bytes)
Powered by blists - more mailing lists