]> git.baikalelectronics.ru Git - kernel.git/commit
mm/vma: append unlikely() while testing VMA access permissions
authorAnshuman Khandual <anshuman.khandual@arm.com>
Tue, 7 Apr 2020 03:03:59 +0000 (20:03 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 7 Apr 2020 17:43:38 +0000 (10:43 -0700)
commit3263051de72499afac497da32620bed924674be5
treec2a9aad0d1cbe3d9304d67b64aba59a2d0e3f463
parent68a3f650992c28b3ab4a302d3156daf0176ed108
mm/vma: append unlikely() while testing VMA access permissions

It is unlikely that an inaccessible VMA without required permission flags
will get a page fault.  Hence lets just append unlikely() directive to
such checks in order to improve performance while also standardizing it
across various platforms.

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Guo Ren <guoren@kernel.org>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Paul Burton <paulburton@kernel.org>
Cc: Mike Rapoport <rppt@linux.ibm.com>
Link: http://lkml.kernel.org/r/1582525304-32113-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
arch/csky/mm/fault.c
arch/m68k/mm/fault.c
arch/mips/mm/fault.c