Re: [PATCH] mm/memcontrol: avoid unnecessary PageTransHuge() when counting compound page

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michal Hocko writes:
On Mon 06-05-19 23:22:11, Yafang Shao wrote:
It is a better code, I think.
Regarding the performance, I don't think it is easy to measure.

I am not convinced the patch is worth it. The code aesthetic is a matter
of taste. On the other hand, the change will be an additional step in
the git history so git blame take an additional step to get to the
original commit which is a bit annoying. Also every change, even a
trivially looking one, can cause surprising side effects. These are all
arguments make a change to the code.

So unless the resulting code is really much more cleaner, easier to read
or maintain, or it is a part of a larger series that makes further steps
easier,then I would prefer not touching the code.

Aside from what Michal already said, which I agree with, when skimming code reading PageTransHuge has much clearer intent to me than checking nr_pages. We already have a non-trivial number of checks which are unclear at first glance in the mm code and, while this isn't nearly as bad as some of those, and might not make the situation much worse, I also don't think changing to nr_pages checks makes the situation any better, either.




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux