pcp
[Top] [All Lists]

Re: [pcp] pmda instance cache operations

To: Max Matveev <makc@xxxxxxxxx>
Subject: Re: [pcp] pmda instance cache operations
From: Ken McDonell <kenj@xxxxxxxxxxxxxxxx>
Date: Mon, 25 Jan 2010 16:43:11 +1100
Cc: pcp@xxxxxxxxxxx
In-reply-to: <19292.63776.791122.269945@xxxxxxxxxxxx>
References: <19292.18578.486513.899049@xxxxxxxxxxxx> <1264365282.5401.3.camel@xxxxxxxxxxxxxxxx> <19292.49501.402549.217702@xxxxxxxxxxxx> <1264372796.5401.13.camel@xxxxxxxxxxxxxxxx> <19292.63776.791122.269945@xxxxxxxxxxxx>
Reply-to: kenj@xxxxxxxxxxxxxxxx
OK, d) is probably most sensible and not hard (now I've looked at the
code), so I'll implement that option.

And yep, pmdaCacheOp(indom, PMDA_CACHE_CULL) will clean the cache for
that indom.

On Mon, 2010-01-25 at 12:51 +1100, Max Matveev wrote:
> On Mon, 25 Jan 2010 09:39:56 +1100, Ken McDonell wrote:
> 
>  kenj> So, what do you think the correct outcome should be?
> 
>  kenj> a) second pmdaCacheOp(indom, PMDA_CACHE_LOAD) returns an error?
>  kenj> b) pmdaCacheOp(indom, PMDA_CACHE_LOAD) fails if anything already in the
>  kenj> cache?
>  kenj> c) purge cache first then load, so 2 inactive instances?
>  kenj> d) cache state wins if loaded instance already in cache?
> 
>  kenj> I'd vote for b) which is a very similar to a), but a little easier to
>  kenj> explain and deals with the more subtle no load, store an instance, then
>  kenj> try to load flawed logic.
> 
> In my particular case d) is what I was expecting but then I wasn't
> expecting the second LOAD. I can live with b), just need to get into
> the habit of checking return values from LOAD.
> 
> On the somewhat related note, am I correct in assuming that
> pmdaCacheOp(indom, PMDA_CACHE_CULL) is the only option to clean
> all the entires in the cache in preparation to the second loading?
> 
> max


<Prev in Thread] Current Thread [Next in Thread>