[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20ed1295-3012-4d71-a4d3-9d6a63cdfdf3@zytor.com>
Date: Wed, 23 Oct 2024 14:40:59 -0700
From: "H. Peter Anvin" <hpa@...or.com>
To: Dave Hansen <dave.hansen@...el.com>,
"Christoph Lameter (Ampere)" <cl@...two.org>
Cc: Peter Zijlstra <peterz@...radead.org>,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
Ingo Molnar <mingo@...nel.org>, Uros Bizjak <ubizjak@...il.com>,
linux-mm@...ck.org, linux-kernel@...r.kernel.org, llvm@...ts.linux.dev,
Dennis Zhou <dennis@...nel.org>, Tejun Heo <tj@...nel.org>,
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,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers <ndesaulniers@...gle.com>,
Bill Wendling
<morbo@...gle.com>,
Justin Stitt <justinstitt@...gle.com>
Subject: Re: [PATCH v1 1/1] x86/percpu: Cast -1 to argument type when
comparing in percpu_add_op()
On 10/23/24 10:15, Dave Hansen wrote:
> On 10/22/24 16:24, Christoph Lameter (Ampere) wrote:
>> On Tue, 22 Oct 2024, Dave Hansen wrote:
>>
>>> So I think Peter's version was the best. It shuts up clang and also
>>> preserves the existing (good) gcc 'sub' behavior. I'll send it out for
>>> real in a bit, but I'm thinking of something like the attached patch.
>> The desired behavior is a "dec". "sub" has a longer op code AFAICT.
>
> Gah, yes, of course. I misspoke.
>
> We want "inc" and "dec" for +1 and -1. "add" and "sub" are heftier and
> get used for everything else.
Do we really? I don't know if there are any microarchitectures where the
partial register update still matters. It is only one byte difference.
-hpa
Powered by blists - more mailing lists