[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZPYrFeAzWjESRiJD@gmail.com>
Date: Mon, 4 Sep 2023 21:08:05 +0200
From: Ingo Molnar <mingo@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Michał Mirosław <mirq-linux@...e.qmqm.pl>,
Ingo Molnar <mingo@...hat.com>, Will Deacon <will@...nel.org>,
Waiman Long <longman@...hat.com>,
Boqun Feng <boqun.feng@...il.com>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] locking/mutex: remove redundant argument from
__mutex_lock_common()
* Peter Zijlstra <peterz@...radead.org> wrote:
> On Sun, Sep 03, 2023 at 12:33:19AM +0200, Michał Mirosław wrote:
> > use_ww_ctx is equivalent to ww_ctx != NULL. The one case where
> > use_ww_ctx was true but ww_ctx == NULL leads to the same
> > __mutex_add_waiter() call via __ww_mutex_add_waiter().
> >
> > Since now __ww_mutex_add_waiter() is called only with ww_ctx != NULL
> > (from both regular and PREEMPT_RT implementations), remove the
> > branch there.
> >
>
> There were compilers that failed to constant propagate the ww_ctx==NULL
> thing properly and generated crap code, the use_ww_ctx thing fixed that.
>
> I can't remember which compilers that were (my brain is saying <gcc-6 or
> something, but I could be totally wrong) and if we still care about
> people using them (probably not).
The changelog of the patch should probably include before/after generated
code comparison & analysis - or at minimum a '/bin/size' comparison to
quantify the changes to generated code.
Thanks,
Ingo
Powered by blists - more mailing lists