Re: FILEDESC_LOCK() implementation

From: Paul Allen <nospam_at_ugcs.caltech.edu>
Date: Wed, 21 Jun 2006 13:19:27 -0700
>From Robert Watson <rwatson_at_freebsd.org>, Wed, Jun 21, 2006 at 07:46:33PM +0100:
> I would optimize very carefully here, the trade-offs are tricky, and we may 
> find that by making locking more complex, we cause cache problems, increase 
> lock hold periods, etc, even if we decrease contention.  I've wondered a 
> bit about a model where we loan fd's to threads to optimize repeated access 
> to the same fd by the same thread, but this mostly makes sense in the 
> context of a 1:1 model rather than an m:n model.
I apologize for not understanding all of the uses of the FILEDESC lock but,
isn't the more obvious partitioning per-cpu: each cpu may allocate from a 
range of fd, which cpu cache used depends on where the thread happens 
to be running.  When closing a fd, it is returned to the local (possibly 
different cpu cache).  A watermark is used to generate an IPI message to
rebalance the caches as needed.
Received on Wed Jun 21 2006 - 18:19:29 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:57 UTC