[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC] docs/designs: PV stats interface



>>> On 23.11.16 at 15:14, <paul.durrant@xxxxxxxxxx> wrote:
> +The `name` must be a NUL terminated ASCII string containing only
> +alphanumeric characters, printable non-alphanumeric characters or a space
> +character, i.e. the expression:
> +
> +    (isalnum(name[i]) || ispunct(name[i]) || name[i] == ' ')
> +
> +must be true for each value of `i` until `name[i] == '\0'`

I think it is clear what you mean here, but I'd still like to point out
that this isn't an abstract definition: You assume C language to
interpret the meaning of the two functions used (leaving aside the
hardly relevant language grammar aspect), and you assume an
unspecified locale. For example, I can't see why UTF8 strings
shouldn't be valid to be used here.

> +When iterating through the `stats_name_type` structures a monitoring agents
> +can determine that it has finished when it either encounters a `type` value
> +of 0, or it has iterated through all 64 structures in the granted page and
> +there are no further `name-type-ref` keys.

This "type value of 0" wants a #define then too, I think.

> +A monitoring agent can find the value of a statistic by noting the
> +`name-type-ref` index and the offset into the page where the
> +`stats_name_type` was found and the looking at the same offset in the
> +corresponding `val-ref` page. Values are therefore also 64 octets
> +in length and contain:
> +
> +* `STATS_TYPE_S64` : A signed 64-bit integer in little endian form in
> +                  octets 0..7
> +* `STATS_TYPE_U64` : An unsigned 64-bit integer in little endian form in
> +                  octets 0..7
> +* `STATS_TYPE_DOUBLE` : A double precision floating point value in little
> +                     endian form in
> +                     octets 0..7
> +* `STATS_TYPE_ASCII` : A NUL terminated ASCII string meeting the same
> +                    criteria as `name`
> +
> +A statistics provider should not update any of the statistics in a set
> +until the `event-channel` is signalled indicating that a monitoring agent
> +wishes to sample them. Thus the rate of update is nominally under control
> +of the monitoring agent.
> +
> +When such a signal is received, all statistics in the set should then be
> +updated and a signal set back to the monitoring agent via the

s/set/sent/ ?

> +`event-channel` to say that the update is complete. The monitoring agent
> +can then sample the whole set, knowing that it is self-consistent, as long
> +as the provider is not misbehaving.

And as long as there aren't multiple agents.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.