From: Dave Hansen <dave.hansen@intel.com>
To: "Chang S. Bae" <chang.seok.bae@intel.com>, linux-kernel@vger.kernel.org
Cc: x86@kernel.org, platform-driver-x86@vger.kernel.org,
tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
dave.hansen@linux.intel.com, hdegoede@redhat.com,
ilpo.jarvinen@linux.intel.com, tony.luck@intel.com,
ashok.raj@intel.com, jithu.joseph@intel.com
Subject: Re: [PATCH v2 1/2] x86/fpu: Extend kernel_fpu_begin_mask() to initialize AMX state
Date: Wed, 8 May 2024 12:11:02 -0700 [thread overview]
Message-ID: <29e54919-edff-41ba-a3d0-d400e36fa6b9@intel.com> (raw)
In-Reply-To: <62e2ebd9-4afa-4bb1-a30c-5ba34bc6b94e@intel.com>
On 5/8/24 11:03, Chang S. Bae wrote:
> On 5/8/2024 7:40 AM, Dave Hansen wrote:
>> On 5/7/24 16:53, Chang S. Bae wrote:
>>
>>> However, due to resource constraints in storage, AMX state is excluded
>>> from the scope of state recovery. Consequently, AMX state must be in its
>>> initialized state for the IFS test to run.
>>
>> This doesn't mention how this issue got introduced. Are we all bad at
>> reading the SDM? :)
>
> Ah, I'd rather zap out this SDM sentence.
My point is that this is fixing a bug. Where did that bug come from?
What got screwed up here?
Hint: I don't think us software folks screwed up here. It was likely
the folks that built the two hardware features (AMX and IFS) forgot to
talk to each other, or someone forgot to document the AMX clobbering
aspect of the architecture.
>>> When AMX workloads are running, an active user AMX state remains even
>>> after a context switch, optimizing to reduce the state reload cost. In
>>> such cases, the test cannot proceed if it is scheduled.
>>
>> This is a bit out of the blue. What does scheduling have do do with IFS?
...
> So, the CPU stopper threads for <cpu#> and its sibling to execute
> doscan() are queued up with the highest priority.
...
But this is the IFS implementation *today*. The explanation depends on
IFS being implemented with something that context switches. It also
depends on folks expecting context switches to always switch FPU state.
I'd just say:
The kernel generally runs with live user FPU state, including
AMX. That state can prevent IFS tests from running.
That's _much_ more simple, generic and also fully explains the
situation. It also isn't dependent on the IFS stop_cpus_run()
implementation of today, which could totally change tomorrow.
The underlying rule has zero to do with scheduling or context switching
optimizations.
next prev parent reply other threads:[~2024-05-08 19:11 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-30 21:25 [PATCH 0/2] x86/fpu: Extend kernel_fpu_begin_mask() for the In-Field Scan driver Chang S. Bae
2024-04-30 21:25 ` [PATCH 1/2] x86/fpu: Extend kernel_fpu_begin_mask() to initialize AMX state Chang S. Bae
2024-04-30 23:42 ` Ashok Raj
2024-04-30 21:25 ` [PATCH 2/2] platform/x86/intel/ifs: Initialize AMX state for the scan test Chang S. Bae
2024-05-01 0:06 ` Ashok Raj
2024-05-01 8:58 ` Hans de Goede
2024-05-08 0:22 ` Chang S. Bae
2024-05-02 11:00 ` Ilpo Järvinen
2024-05-02 22:19 ` Chang S. Bae
2024-05-09 0:45 ` Kuppuswamy Sathyanarayanan
2024-05-02 20:52 ` [PATCH 0/2] x86/fpu: Extend kernel_fpu_begin_mask() for the In-Field Scan driver Chang S. Bae
2024-05-02 21:35 ` Chang S. Bae
2024-05-02 20:59 ` Dave Hansen
2024-05-07 23:53 ` [PATCH v2 " Chang S. Bae
2024-05-07 23:53 ` [PATCH v2 1/2] x86/fpu: Extend kernel_fpu_begin_mask() to initialize AMX state Chang S. Bae
2024-05-08 13:00 ` Thomas Gleixner
2024-05-08 14:40 ` Dave Hansen
2024-05-08 18:03 ` Chang S. Bae
2024-05-08 19:11 ` Dave Hansen [this message]
2024-05-09 0:29 ` Chang S. Bae
2024-05-09 17:36 ` Dave Hansen
2024-05-09 17:41 ` Dave Hansen
2024-05-09 18:41 ` Chang S. Bae
2024-05-09 18:50 ` Dave Hansen
2024-05-10 7:51 ` Thomas Gleixner
2024-05-07 23:53 ` [PATCH v2 2/2] platform/x86/intel/ifs: Initialize AMX state for the scan test Chang S. Bae
2024-05-08 0:19 ` Ashok Raj
2024-05-08 0:21 ` Chang S. Bae
2024-05-08 8:28 ` [PATCH v2 0/2] x86/fpu: Extend kernel_fpu_begin_mask() for the In-Field Scan driver Ilpo Järvinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=29e54919-edff-41ba-a3d0-d400e36fa6b9@intel.com \
--to=dave.hansen@intel.com \
--cc=ashok.raj@intel.com \
--cc=bp@alien8.de \
--cc=chang.seok.bae@intel.com \
--cc=dave.hansen@linux.intel.com \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=jithu.joseph@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=platform-driver-x86@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome