]> Git Repo - linux.git/commit
mm/hugetlb: avoid calculating fault_mutex_hash in truncate_op case
authorMiaohe Lin <[email protected]>
Wed, 5 May 2021 01:33:34 +0000 (18:33 -0700)
committerLinus Torvalds <[email protected]>
Wed, 5 May 2021 18:27:20 +0000 (11:27 -0700)
commitd4241a049ac0049fe96b3dae0598092517dbf6bd
tree17a9a6758bcb4f3cc25e1b31712a548c8bcfc7bc
parentd83e6c8a9b65876b0dcd11ca25e8c39bd7bb1a1c
mm/hugetlb: avoid calculating fault_mutex_hash in truncate_op case

The fault_mutex hashing overhead can be avoided in truncate_op case
because page faults can not race with truncation in this routine.

So calculate hash for fault_mutex only in !truncate_op case to save some
cpu cycles.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Miaohe Lin <[email protected]>
Cc: Mike Kravetz <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/hugetlbfs/inode.c
This page took 0.055294 seconds and 4 git commands to generate.