Lines Matching +full:cache +full:-
15 - mapping from IP address to client name
16 - mapping from client name and filesystem to export options
17 - mapping from UID to list of GIDs, to work around NFS's limitation
19 - mappings between local UID/GID and remote UID/GID for sites that
21 - mapping from network identify to public key for crypto authentication.
24 - general cache lookup with correct locking
25 - supporting 'NEGATIVE' as well as positive entries
26 - allowing an EXPIRED time on cache items, and removing
27 items after they expire, and are no longer in-use.
28 - making requests to user-space to fill in cache entries
29 - allowing user-space to directly set entries in the cache
30 - delaying RPC requests that depend on as-yet incomplete
31 cache entries, and replaying those requests when the cache entry
33 - clean out old entries as they expire.
35 Creating a Cache
36 ----------------
38 1/ A cache needs a datum to store. This is in the form of a
43 Each cache element is reference counted and contains
44 expiry and update times for use in cache management.
45 2/ A cache needs a "cache_detail" structure that
46 describes the cache. This stores the hash table, some
47 parameters for cache management, and some operations detailing how
48 to work with particular cache items.
73 contents of a cache. This should show one item,
77 Format a request to be send to user-space for an item
85 cache entry. It is in 'buf' of length 'len'.
87 cache with sunrpc_cache_lookup_rcu, and update the item
91 3/ A cache needs to be registered using cache_register(). This
95 Using a cache
96 -------------
98 To find a value in a cache, call sunrpc_cache_lookup_rcu passing a pointer
100 This will be passed to ->match to identify the target entry. If no
101 entry is found, a new entry will be create, added to the cache, and
105 if the data is valid, and may initiate an up-call to get fresh data.
106 cache_check will return -ENOENT in the entry is negative or if an up
107 call is needed but not possible, -EAGAIN if an upcall is pending,
113 done when the found cache item is not uptodate, but the is reason to
114 believe that userspace might provide information soon. When the cache
116 revisited (->revisit). It is expected that this method will
127 Populating a cache
128 ------------------
130 Each cache has a name, and when the cache is registered, a directory
134 for communicating between kernel and user for populating the cache.
136 with the cache.
139 passed as a whole to the cache for parsing and interpretation.
140 Each cache can treat the write requests differently, but it is
142 - a key
143 - an expiry time
144 - a content.
145 with the intention that an item in the cache with the give key
149 Reading from a channel is a bit more interesting. When a cache
151 expire, a request is lodged for that cache item to be updated by
152 user-space. These requests appear in the channel file.
159 Thus a user-space helper is likely to:
170 Each cache should define a "cache_parse" method which takes a message
171 written from user-space and processes it. It should return an error
174 Each cache should also define a "cache_request" method which
175 takes a cache item and encodes a request into the buffer
178 Note: If a cache has no active readers on the channel, and has had not
186 -----------------------
188 While each cache is free to use its own format for requests