Re: [PATCH] Page cache accounting
On Sat, Jul 14, 2012 at 05:06:37PM +0200, Richard Braun wrote: > If no major objection is raised (particularly about the new Mig > routine), I'll commit this patch in a few days. As I intend to continue working on the page cache, and because the policy patch alone can't be included now, I have created a branch in the gnumach and hurd repositories. For now they contain the changes concerning the page cache statistics, ready to be merged. A separate patch for procfs will follow. -- Richard Braun
Re: [PATCH] Page cache accounting
At Sun, 15 Jul 2012 19:35:31 +0200, Richard Braun wrote: > > On Sun, Jul 15, 2012 at 06:39:05PM +0200, Neal H. Walfield wrote: > > I'd encourage you to use a more self-describing data structure. In > > the very least, please consider a version number and a bitmask > > indicating which fields are valid. > > What about versioning the call itself, e.g. vm_cache_statistics1 etc.. ? In this case, I guess it doesn't make a big difference. But, in general, you could have the caller provide a list of versions that it understands and allow the server to choose the best version from the intersection of that list and what it supports. This prevents the client from having to make O(N) calls. Neal
Re: [PATCH] Page cache accounting
On Sun, Jul 15, 2012 at 06:39:05PM +0200, Neal H. Walfield wrote: > I'd encourage you to use a more self-describing data structure. In > the very least, please consider a version number and a bitmask > indicating which fields are valid. What about versioning the call itself, e.g. vm_cache_statistics1 etc.. ? -- Richard Braun
Re: [PATCH] Page cache accounting
At Sat, 14 Jul 2012 17:06:37 +0200,
Richard Braun wrote:
>
> If no major objection is raised (particularly about the new Mig
> routine), I'll commit this patch in a few days.
> ...
> +struct vm_cache_statistics {
> + integer_t object_count; /* # of cached objects */
> + integer_t page_count; /* # of cached pages */
> + integer_t _reserved[14];
> +};
I'd encourage you to use a more self-describing data structure. In
the very least, please consider a version number and a bitmask
indicating which fields are valid.
Neal
