Messages in this thread | | | Date | Wed, 8 Oct 2008 04:38:20 +0200 | From | Nick Piggin <> | Subject | Re: [patch][rfc] ddds: "dynamic dynamic data structure" algorithm, for adaptive dcache hash table sizing (resend) |
| |
On Tue, Oct 07, 2008 at 02:05:09PM -0700, David Miller wrote: > From: Nick Piggin <npiggin@suse.de> > Date: Tue, 7 Oct 2008 10:06:56 +0200 > > > Hmm, that is interesting. What are the exact semantics of this rt_cache > > file? > > It dumps the whole set of elements in the routing cache hash table.
Right, so I guess importantly, it must not miss a route that remains in the cache for the duration of the read(2)s. Obviously routes concurrently entering and leaving the cache will not have any guarantees, including causality (if we dump route A, we may still miss route B added before A).
Duplicates? I guess in a sense it could be possible to read route A, then it gets deleted and reinserted? Oh, looking at the code it seems like actually it is possible to miss entries anyway if they get moved to the front of the chain while we're traversing it. Hmm, so if it just has "best effort" kind of semantics, then we don't have to be too worried.
| |