summaryrefslogtreecommitdiff
path: root/fs/dcache.c
diff options
context:
space:
mode:
authorYu Chao <chao2.yu@samsung.com>2013-09-12 03:17:51 (GMT)
committerJaegeuk Kim <jaegeuk.kim@samsung.com>2013-09-24 08:45:48 (GMT)
commite76eebee70948060d80b5f9edd2d97062049df53 (patch)
tree0e553ac012ec66bbd50cc1ab0f3165c307b1b0e0 /fs/dcache.c
parent4a10c2ac2f368583138b774ca41fac4207911983 (diff)
downloadlinux-e76eebee70948060d80b5f9edd2d97062049df53.tar.xz
f2fs: optimize fs_lock for better performance
There is a performance problem: when all sbi->fs_lock are holded, then all the following threads may get the same next_lock value from sbi->next_lock_num in function mutex_lock_op, and wait for the same lock(fs_lock[next_lock]), it may cause performance reduce. So we move the sbi->next_lock_num++ before getting lock, this will average the following threads if all sbi->fs_lock are holded. v1-->v2: Drop the needless spin_lock as Jaegeuk suggested. Suggested-by: Jaegeuk Kim <jaegeuk.kim@samsung.com> Signed-off-by: Yu Chao <chao2.yu@samsung.com> Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs/dcache.c')
0 files changed, 0 insertions, 0 deletions