Matt had called for additional discussion on this, so let's get that discussion going.
Could you address Matt's questions? Frank > -----Original Message----- > From: Satya Prakash GS [mailto:g.satyaprak...@gmail.com] > Sent: Friday, March 9, 2018 4:17 AM > To: nfs-ganesha-devel@lists.sourceforge.net > Cc: Malahal Naineni <mala...@gmail.com>; Frank Filz > <ffilz...@mindspring.com> > Subject: review request https://review.gerrithub.io/#/c/390652/ > > Can somebody please review this change : > https://review.gerrithub.io/#/c/390652/ > > It addresses this issue : > > Leak in DRC when client disconnects nfs_dupreq_finish doesn't call put_drc > always. It does only if it meets certain criteria (drc_should_retire). This > can leak > the drc and the dupreq entries within it when the client disconnects. More > information can be found here : https://sourceforge.net/p/nfs- > ganesha/mailman/message/35815930/ > > ---- > > Main idea behind the change. > > Introduced a new drc queue which holds all the active drc objects (tcp_drc_q > in > drc_st). > Every new drc is added to tcp_drc_q initially. Eventually it is moved to > tcp_drc_recycle_q. Drcs are freed from tcp_drc_recycle_q. Every drc is either > in > the active drc queue or in the recycle queue. > > DRC Refcount and transition from active drc to recycle queue : > > Drc refcnt is initialized to 2. In dupreq_start, increment the drc refcount. > In > dupreq_rele, decrement the drc refcnt. Drc refcnt is also decremented in > nfs_rpc_free_user_data. When drc refcnt goes to 0 and drc is found not in use > for 10 minutes, pick it up and free the entries in iterations of 32 items at > at time. > Once the dupreq entries goes to 0, remove the drc from tcp_drc_q and add it to > tcp_drc_recycle_q. Today, entries added to tcp_drc_recycle_q are cleaned up > periodically. Same logic should clean up these entries too. > > Thanks, > Satya. ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Nfs-ganesha-devel mailing list Nfs-ganesha-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/nfs-ganesha-devel