[bind10-dev] Resolver - address database requirements

Robert Edmonds edmonds at isc.org
Mon Oct 4 09:48:28 UTC 2010


Stephen Morris wrote:
> Limiting the Number of Names in the Store
> As has been pointed out, this is fairly simple to do; hook the names
> onto a queue and delete the names at the head of it.  A LRU algorithm
> would seem to be the best although there is more contention in locking
> and unlocking a LRU queue that there would be if we were to use a FIFO
> queue. Rob's suggestion of a lock-less per-thread LRU queue is
> interesting though, although I guess there is more overhead involved
> in removing an entry when the TTL is reached, as the entry could be in
> more than one of these queues at the same time.

i think i may not have been clear on the lock-less LRU variant.  the
entries in the per-thread expiration lists (at least in my
implementation) form completely disjoint sets -- i.e., the thread that
allocates the entry and appends it to the expiration list must be the
same thread that expires it.  the same entry is never present in more
than one of the expiration queues at the same time.

-- 
Robert Edmonds
edmonds at isc.org



More information about the bind10-dev mailing list