From: torvic9@mailbox.org
To: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"akpm@linux-foundation.org" <akpm@linux-foundation.org>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: [Question] mm/vmpressure.c: ilog2 calculation in constant
Date: Fri, 28 May 2021 14:08:53 +0200 (CEST) [thread overview]
Message-ID: <1825464932.40588.1622203733380@office.mailbox.org> (raw)
Hello,
in mm/vmpressure.c, we have defined this constant:
static const unsigned int vmpressure_level_critical_prio = ilog2(100 / 10);
My question is: Why do we calculate ilog2 instead of simply setting the constant to '3'?
Then, I guess, we could also get rid of the log2.h include.
Note that this is just a question, not a request, as I'm sure there is a reason for this.
(given the help text in the comment just above)
Greetings,
Tor Vic
next reply other threads:[~2021-05-28 12:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-28 12:08 torvic9 [this message]
2021-05-28 13:08 ` [Question] mm/vmpressure.c: ilog2 calculation in constant David Hildenbrand
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=1825464932.40588.1622203733380@office.mailbox.org \
--to=torvic9@mailbox.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/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;
as well as URLs for NNTP newsgroup(s).