lockless file descriptor lookup

Robert Watson rwatson at FreeBSD.org
Thu May 21 09:39:26 UTC 2009

On Tue, 12 May 2009, Jeff Roberson wrote:

>> It's nice to see someone stepped up to implement this. Just out of 
>> curiosity, have you done any benchmarks to see how many percent of the time 
>> a thread needs more than one attempt to obtain a valid reference on a 
>> common workload?
>> Maybe it would be nice for diagnostic purposes to add two sysctls to obtain 
>> the amount of successful and unsuccessful attempts.
> I have had trouble triggering it at all in testing.  I'd prefer not to 
> commit the counters because they would re-introduce a global point of cache 
> contention unless we made them per-cpu.

Just as a general observation here: our recent experience with the sysctl 
counters for microtime(), et al, in the kernel strongly support this view: 
once the per-CPU allocator is available in the base kernel for 8.0, we should 
attempt to purge as many of these casually strewn counters in critical paths 
as we can.

Robert N M Watson
Computer Laboratory
University of Cambridge

More information about the freebsd-arch mailing list