At Thu, 02 May 2013 11:29:31 +0800,
Liu Yuan wrote:
> 
> On 05/02/2013 10:48 AM, MORITA Kazutaka wrote:
> > Another approach is removing sockfd_cache_put() from
> > sheep_del_sockfd(), and setting false to fd.in_use in
> > sockfd_cache_del().  I didn't take this approach because it needs more
> > modifications and would break the current stable code.
> 
> It looks that we only need fold sockfd_cache_put into sockfd_cache_del
> with the same lock context in the sheep_del_sockfd(), not a big
> modification, no?

We need:
 - Create sockfd_cache_put_nolock() to be called in the write lock
   context of sockfd_cache_del().
 - Close the timeout fd even when slots_all_free() returns false.

Anyway, looks like a smaller change than what I thought.

Thanks,

Kazutaka
-- 
sheepdog mailing list
sheepdog@lists.wpkg.org
http://lists.wpkg.org/mailman/listinfo/sheepdog

Reply via email to