[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 6/6] xl: 'xl claims' print outstanding per domain claims if enabled (claim_mode=1 in xl.conf)
Konrad Rzeszutek Wilk writes ("Re: [PATCH 6/6] xl: 'xl claims' print outstanding per domain claims if enabled (claim_mode=1 in xl.conf)"): ... > Please see inline patch: Thanks. I think this is mostly correct now. I have a few quibbles about the docs. It occurs to me that maybe some of these hunks ought to be folded into earlier patches in your series, but I'll leave the decision about that to you. > [v1: claims, not claim-list] > [v2: Add outstanding and current memkb in the output list] > Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx> > > diff --git a/docs/man/xl.pod.1 b/docs/man/xl.pod.1 > index c2296ef..a0c14c8 100644 > --- a/docs/man/xl.pod.1 > +++ b/docs/man/xl.pod.1 > @@ -280,7 +280,8 @@ An example format for the list is as follows: > > Name is the name of the domain. ID the numeric domain id. Mem is the > desired amount of memory to allocate to the domain (although it may > -not be the currently allocated amount). VCPUs is the number of > +not be the currently allocated amount - unless B<claim_mode> in xl.cfg has > +been enabled, see B<claims> below). VCPUs is the number of I'm confused now. Firstly I'm not sure why existing text says "it may not be the currently allocated amount". If it comes from current_memkb then surely it is exactly the currently allocated amount. Secondly I don't see how claim mode makes any difference. > +The value equals the I<memory> in the guest config (see xl.conf manpage). I'm not sure this is true. For example, if the guest has been asked to change its balloon but has not yet reached its target. > +An example format for the list is as follows: > + > + Name ID Mem VCPUs State > Time(s) Claimed > + Domain-0 0 2047 4 r----- > 19.7 0 > + OL5 2 2048 1 --p--- > 0.0 847 > + OL6 3 1024 4 r----- > 5.9 0 > + Windows_XP 4 2047 1 --p--- > 0.0 1989 > + > +In which it can be seen that the OL5 guest still has 847MB of claimed > +memory (out of the total 2048MB where 1191MB has been allocated to > +the guest). Great. > @@ -3865,9 +3865,9 @@ int libxl_wait_for_memory_target(libxl_ctx *ctx, > uint32_t domid, int wait_secs) > rc = libxl_domain_info(ctx, &info, domid); > if (rc < 0) > return rc; > - } while (wait_secs > 0 && info.current_memkb > target_memkb); > + } while (wait_secs > 0 && (info.current_memkb + info.outstanding_memkb) > > target_memkb); Was this in the previous version ? It looks right to me, anyway. > @@ -3078,7 +3080,8 @@ static void list_domains(int verbose, int context, > const libxl_dominfo *info, in > printf("%-40s %5d %5lu %5d %c%c%c%c%c%c %8.1f", > domname, > info[i].domid, > - (unsigned long) (info[i].current_memkb / 1024), > + (unsigned long) ((info[i].current_memkb + > + info[i].outstanding_memkb)/ 1024), Right, I think this is correct. > @@ -5927,6 +5933,33 @@ static char *uptime_to_string(unsigned long uptime, > int short_mode) ... > +int main_claims(int argc, char **argv) > +{ > + libxl_dominfo *info; > + int opt; > + int nb_domain; > + > + SWITCH_FOREACH_OPT(opt, "", NULL, "claims", 0) { > + /* No options */ > + } > + > + if (!libxl_defbool_val(claim_mode)) { > + fprintf(stderr, "claim_mode not enabled (see man xl.conf).\n"); > + return 1; > + } I think this should be a warning, not an error. If you turn claim mode off in the config file, you should still be able to list any existing claims in previously-created domains. Thanks, Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |