[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.22.394.2103021007490.860725@gentwo.de>
Date: Tue, 2 Mar 2021 10:09:10 +0100 (CET)
From: Christoph Lameter <cl@...two.de>
To: Yejune Deng <yejune.deng@...il.com>
cc: penberg@...nel.org, rientjes@...gle.com, iamjoonsoo.kim@....com,
akpm@...ux-foundation.org, vbabka@...e.cz, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] include/linux/slab.h: use for() and left shift to
calculate
On Tue, 2 Mar 2021, Yejune Deng wrote:
> use for() and left shift to calculate the value that compared with size.
There is a reason for the madness...
The current code was written so compilers can do proper constant folding
and eliminate the whole function entirely.
If you want this change then please verify that all compilers currently in
use with this code do proper constant folding and never generate code for
the for loop.
Powered by blists - more mailing lists