linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Question] mm/vmpressure.c: ilog2 calculation in constant
@ 2021-05-28 12:08 torvic9
  2021-05-28 13:08 ` David Hildenbrand
  0 siblings, 1 reply; 2+ messages in thread
From: torvic9 @ 2021-05-28 12:08 UTC (permalink / raw)
  To: linux-kernel, akpm; +Cc: linux-mm

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-28 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-28 12:08 [Question] mm/vmpressure.c: ilog2 calculation in constant torvic9
2021-05-28 13:08 ` David Hildenbrand

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).