]> git.baikalelectronics.ru Git - kernel.git/commit
mm: thp: microoptimize compound_mapcount()
authorAndrea Arcangeli <aarcange@redhat.com>
Fri, 20 May 2016 23:58:24 +0000 (16:58 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 21 May 2016 00:58:30 +0000 (17:58 -0700)
commitef0d65a5f4df1cfe51a91df892ebbb16ea1c182b
tree280af3a27eff695bdf9275bb4e69aa474638c6b8
parent580ac20b79b3f8b420aadbca92b7bdfe4db34eca
mm: thp: microoptimize compound_mapcount()

compound_mapcount() is only called after PageCompound() has already been
checked by the caller, so there's no point to check it again.  Gcc may
optimize it away too because it's inline but this will remove the
runtime check for sure and add it'll add an assert instead.

Link: http://lkml.kernel.org/r/1462547040-1737-3-git-send-email-aarcange@redhat.com
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/mm.h