From: Yu Chao Date: Thu, 12 Sep 2013 03:17:51 +0000 (+0800) Subject: f2fs: optimize fs_lock for better performance X-Git-Tag: v3.13-rc1~113^2~41 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e76eebee70948060d80b5f9edd2d97062049df53;p=pandora-kernel.git 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 Signed-off-by: Yu Chao Signed-off-by: Gu Zheng Signed-off-by: Jaegeuk Kim --- Reading git-diff-tree failed