[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YkxMtx9zdk+nH33r@zn.tnic>
Date: Tue, 5 Apr 2022 16:05:43 +0200
From: Borislav Petkov <bp@...en8.de>
To: Wyes Karny <wyes.karny@....com>
Cc: linux-kernel@...r.kernel.org, Lewis.Carroll@....com,
Mario.Limonciello@....com, gautham.shenoy@....com,
Ananth.Narayan@....com, bharata@....com, len.brown@...el.com,
x86@...nel.org, tglx@...utronix.de, mingo@...hat.com,
dave.hansen@...ux.intel.com, hpa@...or.com, peterz@...radead.org,
chang.seok.bae@...el.com, keescook@...omium.org, metze@...ba.org,
zhengqi.arch@...edance.com, mark.rutland@....com
Subject: Re: [PATCH] x86: Prefer MWAIT over HALT on AMD processors
On Tue, Apr 05, 2022 at 06:30:21PM +0530, Wyes Karny wrote:
> From: Lewis Caroll <lewis.carroll@....com>
>
> Currently in the absence of the cpuidle driver (eg: when global
> C-States are disabled in the BIOS or when cpuidle is driver is not
> compiled in),
When does that ever happen?
Sounds like a very very niche situation to me...
> Here we enable MWAIT instruction as the default idle call for AMD
> Zen processors which support MWAIT. We retain the existing behaviour
> for older processors which depend on HALT.
Please use passive voice in your commit message: no "we" or "I", etc,
and describe your changes in imperative mood.
Also, pls read section "2) Describe your changes" in
Documentation/process/submitting-patches.rst for more details.
Also, see section "Changelog" in
Documentation/process/maintainer-tip.rst
Bottom line is: personal pronouns are ambiguous in text, especially with
so many parties/companies/etc developing the kernel so let's avoid them
please.
> static int prefer_mwait_c1_over_halt(const struct cpuinfo_x86 *c)
> {
> - if (c->x86_vendor != X86_VENDOR_INTEL)
> + if (!early_mwait_supported(c))
Isn't it enough to simply do here:
if (cpu_has(c, X86_FEATURE_ZEN))
return 1;
if (c->x86_vendor != X86_VENDOR_INTEL)
return 0;
...
--
Regards/Gruss,
Boris.
https://people.kernel.org/tglx/notes-about-netiquette
Powered by blists - more mailing lists