2011/1/12 Eric Blake <eblake@xxxxxxxxxx>: > On 01/12/2011 12:56 AM, Nikunj A. Dadhania wrote: >> Here is the patch, now the set calls are also ull. >> +++ b/tools/virsh.c >> @@ -2987,9 +2987,14 @@ cmdMemtune(vshControl * ctl, const vshCmd * cmd) >> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â params[i].value.l); >> Â Â Â Â Â Â Â Â Â Â Âbreak; >> Â Â Â Â Â Â Â Â Âcase VIR_DOMAIN_MEMORY_PARAM_ULLONG: >> - Â Â Â Â Â Â Â Â Â ÂvshPrint(ctl, "%-15s: %llu\n", params[i].field, >> - Â Â Â Â Â Â Â Â Â Â Â Â Â Â params[i].value.ul); >> + Â Â Â Â Â Â Â Â{ >> + Â Â Â Â Â Â Â Â Â Âif (params[i].value.ul == VIR_DOMAIN_MEMORY_PARAM_UNLIMITED) >> + Â Â Â Â Â Â Â Â Â Â Â ÂvshPrint(ctl, "%-15s: unlimited\n", params[i].field); >> + Â Â Â Â Â Â Â Â Â Âelse >> + Â Â Â Â Â Â Â Â Â Â Â ÂvshPrint(ctl, "%-15s: %llu\n", params[i].field, >> + Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â params[i].value.ul); > > Do we want any back-compat considerations? ÂThat is, if a newer virsh is > talking to an older server, which still answered INT64_MAX>>10 instead > of the new VIR_DOMAIN_MEMORY_PARAM_UNLIMITED, should we recognize that > situation as another reason to print "unlimited"? > Why do we define VIR_DOMAIN_MEMORY_PARAM_UNLIMITED to UINT64_MAX anyway when currently INT64_MAX >> 10 is supported to mean unlimited? Why do we want to complicate all applications that use the memory parameter API, because they effectively need to interpret two values as unlimited? Are there any really compelling reasons to change the value that means unlimited? Another question: How do I set a memory parameter back to unlimited? Do I need to specify INT64_MAX >> 10 as numeric value in virsh? Matthias -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list