From: Christoph Lameter <cl@gentwo.de>
To: Yejune Deng <yejune.deng@gmail.com>
Cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com,
akpm@linux-foundation.org, vbabka@suse.cz, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] include/linux/slab.h: use for() and left shift to calculate
Date: Tue, 2 Mar 2021 10:09:10 +0100 (CET) [thread overview]
Message-ID: <alpine.DEB.2.22.394.2103021007490.860725@gentwo.de> (raw)
In-Reply-To: <20210302033908.51706-1-yejune.deng@gmail.com>
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.
prev parent reply other threads:[~2021-03-02 9:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-02 3:39 Yejune Deng
2021-03-02 3:52 ` Matthew Wilcox
2021-03-02 9:09 ` Christoph Lameter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.DEB.2.22.394.2103021007490.860725@gentwo.de \
--to=cl@gentwo.de \
--cc=akpm@linux-foundation.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=penberg@kernel.org \
--cc=rientjes@google.com \
--cc=vbabka@suse.cz \
--cc=yejune.deng@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox