On Thu, Oct 10, 2024 at 1:21 AM Miklos Szeredi <miklos@xxxxxxxxxx> wrote: > > On Thu, 10 Oct 2024 at 02:45, Joanne Koong <joannelkoong@xxxxxxxxx> wrote: > > I think it's fine for these edge cases to slip through since most of > > them will be caught eventually by the subsequent timeout handler runs, > > but I was more worried about the increased lock contention while > > iterating through all hashes of the fpq->processing list. But I think > > for that we could just increase the timeout frequency to run less > > frequently (eg once every 5 minutes instead of once every minute) > > Yeah, edge cases shouldn't matter. I think even 1/s frequency > wouldn't be too bad, this is just a quick scan of a (hopefully) not > too long list. > > BTW, the cumulative lock contention would be exactly the same with the > separate timeout list, I wouldn't worry too much about it. > > > Alternatively, I also still like the idea of something looser with > > just periodically (according to whatever specified timeout) checking > > if any requests are being serviced at all when fc->num-waiting is > > non-zero. However, this would only protect against fully deadlocked > > servers and miss malicious ones or half-deadlocked ones (eg > > multithreaded fuse servers where only some threads are deadlocked). > > I don't have a preference. Whichever is simpler to implement. > Sounds great, thanks for the feedback. I'll submit v8 with these new changes of reusing the existing lists. Thanks, Joanne > Thanks, > Miklos