[PATCH] f2fs: use spinlock for segmap_lock instead of rwlock

2015-02-11 Thread Chao Yu
rwlock can provide better concurrency when there are much more readers than writers because readers can hold the rwlock simultaneously. But now, for segmap_lock rwlock in struct free_segmap_info, there is only one reader 'mount' from below call path: ->f2fs_fill_super ->build_segment_manager

[PATCH] f2fs: use spinlock for segmap_lock instead of rwlock

2015-02-11 Thread Chao Yu
rwlock can provide better concurrency when there are much more readers than writers because readers can hold the rwlock simultaneously. But now, for segmap_lock rwlock in struct free_segmap_info, there is only one reader 'mount' from below call path: -f2fs_fill_super -build_segment_manager