I'm not sure I believe that there is hang case, but if there is, the simple fix for it is to bound the offending wait.
I have a branch that uses a lock-free bounded mpmc queue based work we did last year in the Ceph codebase. I have something working but not efficiently, and I haven't have time to explore the issues/tuning. Any dramatic change here should probably not be for 2.3. Matt ----- "Malahal Naineni" <mala...@us.ibm.com> wrote: > William Allen Simpson [william.allen.simp...@gmail.com] wrote: > > On 9/8/15 9:03 PM, Malahal Naineni wrote: > > > The nfs_rpc_enqueue_req is called by the producer and > > > nfs_rpc_dequeue_req is called by the consumer. Here is the high > level > > > view of those functions. > > > > > > In particular, if a consumer finds no request in the queue, and > then > > > attempts to go to sleep, but before he adds himself to the wait > list > > > (before step 2b), if producer adds another request at that > instant, the > > > producer would find the wait list empty and couldn't wake up any > > > consumer. > > > > > I've not paid much attention to this, as my goal is to eliminate > it, > > but isn't there a lock involved? That would make all the > difference. > > Locks are there but they fail to ensure the race! How are you going > to > eliminate it? Wondering if having a lane for each worker thread is a > good idea here. This would make it SPSC (single producer single > consumer) which should be easy for a lockless code. > > Regards, Malahal. > > > ------------------------------------------------------------------------------ > Monitor Your Dynamic Infrastructure at Any Scale With Datadog! > Get real-time metrics from all of your servers, apps and tools > in one place. > SourceForge users - Click here to start your Free Trial of Datadog > now! > http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 > _______________________________________________ > Nfs-ganesha-devel mailing list > Nfs-ganesha-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel -- Matt Benjamin CohortFS, LLC. 315 West Huron Street, Suite 140A Ann Arbor, Michigan 48103 http://cohortfs.com tel. 734-761-4689 fax. 734-769-8938 cel. 734-216-5309 ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel