Re: [PATCH 18/27] NSM: Refactor nsm_handle creation into a helper function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Dec 11, 2008 at 12:09:49PM -0500, Chuck Lever wrote:
> On Dec 10, 2008, at Dec 10, 2008, 6:28 PM, J. Bruce Fields wrote:
>> On Fri, Dec 05, 2008 at 07:04:09PM -0500, Chuck Lever wrote:
>>> Clean up.
>>
>> The nsm_create_handle() thing is fine, but
>>
>>>
>>> We're about to get rid of the "goto retry" in nsm_get_handle().
>>
>> I'm not that interested in removing the "goto retry".  I realize  
>> tastes
>> differ here, but I don't see a great improvement.  The:
>>
>> 	retry:
>> 		look for something
>> 		oops, not there, allocate a new one
>> 		goto retry
>>
>> pattern is pretty common and I'm comfortable with it.
>
> Would we need the retry at all if we replaced nsm_lock with a mutex?   
> nlm_lookup_host() holds its mutex across a kzalloc() call.  We could do 
> the same here, and it would make this much more straightforward.
>
> Is there any real need for the atomic_dec_and_lock in nsm_release(), for 
> example?  That's not exactly a performance-critical code path.

Perhaps not, but I can't see any harm in leaving this as is.

--b.
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux