Re: [f2fs-dev] [PATCH] f2fs: use rw_sem instead of fs_lock(locks mutex)

2013-09-26 Thread Gu Zheng
Hi Jin, Thanks for your comments. On 09/26/2013 08:31 PM, Jin Xu wrote: > Great to see fs_locks is to be replaced. :) > > There is a potential problem with using r/w semaphore this way. The > thread doing checkpoint might get starved if other threads are > intensively locking the read semaphore f

Re: [f2fs-dev] [PATCH] f2fs: use rw_sem instead of fs_lock(locks mutex)

2013-09-26 Thread Jin Xu
Great to see fs_locks is to be replaced. :) There is a potential problem with using r/w semaphore this way. The thread doing checkpoint might get starved if other threads are intensively locking the read semaphore for I/O. I noticed that Josef introduced a rwsem_is_contended for solving similar i

[f2fs-dev] [PATCH] f2fs: use rw_sem instead of fs_lock(locks mutex)

2013-09-26 Thread Gu Zheng
The fs_locks is used to block other ops(ex, recovery) when doing checkpoint. And each other operate routine(besides checkpoint) needs to acquire a fs_lock, there is a terrible problem here, if these are too many concurrency threads acquiring fs_lock, so that they will block each other and may lea