Re: [f2fs-dev] [PATCH] f2fs: move f2fs to use reader-unfair rwsems

2022-01-10 Thread Tim Murray via Linux-f2fs-devel
On Mon, Jan 10, 2022 at 7:02 AM Peter Zijlstra wrote: > Can we start by describing the actual problem? Of course. Sorry, I didn't realize Jaegeuk was going to move so quickly with this patch :) We have a few thousand traces from internal Android devices where large numbers of threads throughout

Re: [f2fs-dev] [PATCH] f2fs: move f2fs to use reader-unfair rwsems

2022-01-10 Thread Tim Murray via Linux-f2fs-devel
On Mon, Jan 10, 2022 at 8:15 PM Waiman Long wrote: > That is not how rwsem works. A reader which fails to get the lock > because it is write-locked will remove its reader count before going to > sleep. So the reader count will be zero eventually. Of course, there is > a short period of time where

Re: [f2fs-dev] [PATCH] f2fs: move f2fs to use reader-unfair rwsems

2022-01-12 Thread Tim Murray via Linux-f2fs-devel
On Wed, Jan 12, 2022 at 6:06 AM Peter Zijlstra wrote: > *urgh*... so you're making the worst case less likely but fundamentally > you don't change anything. > > If one of those low prio threads manages to block while holding > cp_rwsem your checkpoint thread will still block for a very long time.

Re: [f2fs-dev] [GIT PULL] f2fs for 5.18

2022-03-22 Thread Tim Murray via Linux-f2fs-devel
Hi Linus, On Tue, Mar 22, 2022 at 10:50 AM Linus Torvalds wrote: > > Even when people get the semantics and memory ordering right (which is > not always the case, but at least the f2fs code uses real lock > primitives - just oddly - and should thus be ok), it invariably tends > to be a sign of so