lkml.org 
[lkml]   [2022]   [Apr]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] x86: Prefer MWAIT over HALT on AMD processors
Date

On 2022/4/5 22:07, Peter Zijlstra wrote:
> On Tue, Apr 05, 2022 at 06:30:21PM +0530, Wyes Karny wrote:
>> +static inline bool early_mwait_supported(const struct cpuinfo_x86 *c)
>> +{
>> + if (c->x86_vendor == X86_VENDOR_INTEL)
>> + return true;
>> +
>> + if (c->x86_vendor == X86_VENDOR_AMD && cpu_has(c, X86_FEATURE_ZEN))
>
> What about Hygon? For some reason you guys don't co-ordinate and we end
> up getting endless 'make-same' patches, sometimes separated by years :/


Hygon CPU supports MWAIT, so this patch also make sense for Hygon :)
As Dave Hansen and Lewis Caroll mentioned in the following threads,
Hygon has already set the X86_FEATURE_ZEN flag, so it's better to
use X86_FEATURE_ZEN for all Zen uarch CPUs.

>> + return true;
>> +
>> + return false;
>> +}

--
Regards,
Pu Wen
\
 
 \ /
  Last update: 2022-04-07 17:29    [W:0.430 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site