mm: thp: cleanup and optimize compound_nr
Minor cleanup and minor optimizations to compound_nr and its callers.
There's no reason to return "unsigned long" in compound_nr, when it's
defined as "unsigned int" in the page structure and it's occasionally
truncated back to a 32bit value in its callers.
In addition its retval should be allowed to be cached in a caller
saved register and not be forced to be re-read from memory at every
iteration if any function called in the loop isn't in scope or inline.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
10 files changed