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

[libvirt] [PATCH 0/8] Report disk latency info



This patch series introduces a new API to report the disk latency
related information, which is supported by upstream QEMU just a
few days ago (commit c488c7f649, Thu Aug 25).

Per previous dicussion on the ABI compatiblity, and API design
principle, the new API is defined with style:

typedef struct _virDomainBlockStatsFlags virDomainBlockStatsFlagsStruct;
typedef virDomainBlockStatsFlagsStruct *virDomainBlockStatsFlagsPtr;

struct _virDomainBlockStatsFlags {
    char field[VIR_DOMAIN_BLOCK_STATS_FIELD_LENGTH];
    long long value;
};

int virDomainBlockStatsFlags (virDomainPtr dom,
                              const char *path,
                              virDomainBlockStatsFlagsPtr params,
                              int *nparams,
                              unsigned int flags)

Other points:

1) With the new API, output of virsh command "domblkstat" is
   different, this might affect the existed scripts. But
   considering we are even introducing new feilds, so this
   can be fine? 

2) qemuMonitorJSONGetBlockStatsInfo set "*errs = 0" before, it
   will cause "domblkstat" always print things like "vda errs 0".
   However, QEMU doesn't support this field. Fixed  it in these
   patches (*errs = -1).

   And new API qemuDomainBlockStatsFlags won't even set a field
   for "errs".  

3) Is it deserved to update gendispatch.pl to generate remote
   codes for functions take argument like "virNodeCPUStatsPtr params",
   "virNodeMemoryStatsPtr params"? All of these argument points
   to structs has same structure. Perhaps we can define an alias
   for these structs and generate the remote codes just like for
   "virTypedParameterPtr params".

[PATCH 1/8] latency: Define new public API and structure
[PATCH 2/8] latency: Define the internal driver callback
[PATCH 3/8] latency: Implemente the public API
[PATCH 4/8] latency: Wire up the remote protocol
[PATCH 5/8] latency: Update monitor functions for new latency fields
[PATCH 6/8] latency: Implemente internal API for qemu driver
[PATCH 7/8] latency: Expose the new API for Python binding
[PATCH 8/8] latency: Update cmdBlkStats to use new API

Regards,
Osier


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