Lines Matching +full:cache +full:- +full:block
2 RPC Cache
21 - mapping from IP address to client name
22 - mapping from client name and filesystem to export options
23 - mapping from UID to list of GIDs, to work around NFS's limitation
25 - mappings between local UID/GID and remote UID/GID for sites that
27 - mapping from network identify to public key for crypto authentication.
31 - general cache lookup with correct locking
32 - supporting 'NEGATIVE' as well as positive entries
33 - allowing an EXPIRED time on cache items, and removing
34 items after they expire, and are no longer in-use.
35 - making requests to user-space to fill in cache entries
36 - allowing user-space to directly set entries in the cache
37 - delaying RPC requests that depend on as-yet incomplete
38 cache entries, and replaying those requests when the cache entry
40 - clean out old entries as they expire.
42 Creating a Cache
43 ----------------
45 - A cache needs a datum to store. This is in the form of a
49 Each cache element is reference counted and contains
50 expiry and update times for use in cache management.
51 - A cache needs a "cache_detail" structure that
52 describes the cache. This stores the hash table, some
53 parameters for cache management, and some operations detailing how
54 to work with particular cache items.
85 contents of a cache. This should show one item,
89 Format a request to be send to user-space for an item
98 cache entry. It is in 'buf' of length 'len'.
100 cache with sunrpc_cache_lookup_rcu, and update the item
104 - A cache needs to be registered using cache_register(). This
108 Using a cache
109 -------------
111 To find a value in a cache, call sunrpc_cache_lookup_rcu passing a pointer
113 This will be passed to ->match to identify the target entry. If no
114 entry is found, a new entry will be create, added to the cache, and
118 if the data is valid, and may initiate an up-call to get fresh data.
119 cache_check will return -ENOENT in the entry is negative or if an up
120 call is needed but not possible, -EAGAIN if an upcall is pending,
126 done when the found cache item is not uptodate, but the is reason to
127 believe that userspace might provide information soon. When the cache
129 revisited (->revisit). It is expected that this method will
140 Populating a cache
141 ------------------
143 Each cache has a name, and when the cache is registered, a directory
147 for communicating between kernel and user for populating the cache.
149 with the cache.
152 passed as a whole to the cache for parsing and interpretation.
153 Each cache can treat the write requests differently, but it is
156 - a key
157 - an expiry time
158 - a content.
160 with the intention that an item in the cache with the give key
164 Reading from a channel is a bit more interesting. When a cache
166 expire, a request is lodged for that cache item to be updated by
167 user-space. These requests appear in the channel file.
171 select or poll for read will block waiting for another request to be
174 Thus a user-space helper is likely to::
186 Each cache should define a "cache_parse" method which takes a message
187 written from user-space and processes it. It should return an error
190 Each cache should also define a "cache_request" method which
191 takes a cache item and encodes a request into the buffer
195 If a cache has no active readers on the channel, and has had not
203 -----------------------
205 While each cache is free to use its own format for requests
214 - If a field begins '\x' then it must contain an even number of
217 - otherwise a \ in the field must be followed by 3 octal digits