From: Christoph Lameter <cl@linux.com>
To: Yury Norov <ynorov@caviumnetworks.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Yury Norov <yury.norov@gmail.com>,
masmart@yandex.ru, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, enberg@kernel.org,
rientjes@google.com, iamjoonsoo.kim@lge.com,
linux@rasmusvillemoes.dk, Alexey Klimov <klimov.linux@gmail.com>
Subject: Re: [PATCH] mm: slab.h: use ilog2() in kmalloc_index()
Date: Wed, 22 Jun 2016 08:28:50 -0500 (CDT) [thread overview]
Message-ID: <alpine.DEB.2.20.1606220826430.4529@east.gentwo.org> (raw)
In-Reply-To: <20160622005135.GA342@yury-N73SV>
On Wed, 22 Jun 2016, Yury Norov wrote:
>
> There will be no fls() for constant at runtime because ilog2() calculates
> constant values at compile-time as well. From this point of view,
> this patch removes code duplication, as we already have compile-time
> log() calculation in kernel, and should re-use it whenever possible.\
The reason not to use ilog there was that the constant folding did not
work correctly with one or the other architectures/compilers. If you want
to do this then please verify that all arches reliably do produce a
constant there.
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
prev parent reply other threads:[~2016-06-22 13:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-20 23:33 Yury Norov
2016-06-21 21:52 ` Andrew Morton
2016-06-22 0:51 ` Yury Norov
2016-06-22 13:28 ` 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.20.1606220826430.4529@east.gentwo.org \
--to=cl@linux.com \
--cc=akpm@linux-foundation.org \
--cc=enberg@kernel.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=klimov.linux@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@rasmusvillemoes.dk \
--cc=masmart@yandex.ru \
--cc=rientjes@google.com \
--cc=ynorov@caviumnetworks.com \
--cc=yury.norov@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