Re: [PATCH 00/22] cache cursors: an introduction
- From
A Large Angry SCM <gitzilla@gmail.com>
- Date
- Sep 12, 2005, 15:38 UTC
- Message-ID
- <4325A0D9.2000806@gmail.com>
- In-Reply-To
- <20050912145543.28120.7086.stgit@dexter.citi.umich.edu>
Chuck Lever wrote:
Show 24 quoted lines
> [ This series is posted for review and comments. ] > > The following patch series introduces an abstraction called a "cache > cursor" that will eventually allow us to replace the current > active_cache array with something else. > > A cache cursor represents a position inside the cache. This position > has a cache_entry associated with it, of course, but since the cache > is ordered, a cache cursor also has the concept of next, previous, > and end-of-cache. > > With a cache cursor we can build a simple iterator mechanism that > calls a particular function for every entry in the cache, in order. > This allows us to hide further the specifics of the active cache > implementation -- the function gets to see the cache cursor and > an element, but does not have direct access to the cache and cannot > assume it has a particular structure. > > Currently the cache cursor type is just a structure with an integer > in it, so it largely mimics the existing implementation. > > This patch series is against the "proposed updates" branch, as of > a couple of days ago. It has been tested via "make test" and I'm > currently using it for my own work without issue.
I'll let others comment on the need for this type of facility and it's proposed implementation.
Since you are proposing an API, some basic documentation about how to use the API would be nice. Comments in cache.h seems the best place, for now.
The sentence "This patch series is against the "proposed updates" branch, as of a couple of days ago." should have also included a commit ID. That way we would know where/when the patches would apply cleanly for testing and dissection.