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

Re: [PATCH v4 07/13] tools/xenstore: use accounting data array for per-domain values



Hi Juergen,

On 05/04/2023 08:03, Juergen Gross wrote:
diff --git a/tools/xenstore/xenstored_domain.h 
b/tools/xenstore/xenstored_domain.h
index 5cfd730cf6..0d61bf4344 100644
--- a/tools/xenstore/xenstored_domain.h
+++ b/tools/xenstore/xenstored_domain.h
@@ -28,7 +28,10 @@ enum accitem {
        ACC_NODES,
        ACC_REQ_N,              /* Number of elements per request. */
        ACC_TR_N = ACC_REQ_N,   /* Number of elements per transaction. */
-       ACC_N = ACC_TR_N,       /* Number of elements per domain. */
+       ACC_WATCH = ACC_TR_N,
+       ACC_OUTST,
+       ACC_MEM,
+       ACC_N,                  /* Number of elements per domain. */
  };
void handle_event(void);
@@ -107,9 +110,8 @@ static inline void domain_memory_add_nochk(struct 
connection *conn,
  void domain_watch_inc(struct connection *conn);
  void domain_watch_dec(struct connection *conn);
  int domain_watch(struct connection *conn);
-void domain_outstanding_inc(struct connection *conn);
-void domain_outstanding_dec(struct connection *conn);
-void domain_outstanding_domid_dec(unsigned int domid);
+void domain_outstanding_inc(struct connection *conn, unsigned int domid);

AFAICT, all the caller of domain_outstanding_inc() will pass 'conn->id'. So it is not entirely clear what's the benefits to add the extra parameter.

I am not against this change (and same for removing *domid_dec()). But I think this ought to be explained in the commit message as this feels unrelated.

+void domain_outstanding_dec(struct connection *conn, unsigned int domid);
  int domain_get_quota(const void *ctx, struct connection *conn,
                     unsigned int domid);

Cheers,

--
Julien Grall



 


Rackspace

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