On Mon, May 25, 2020 at 05:55:39PM +0200, Mark Kettenis wrote: > Including numbers is good! I feel, quite strongly, that lowercase > vcpu isn't right. So please use VCPU (or plural VCPUs) instead. I > also think that your proposal is a bit inconsistent regarding > and > "larger than". So: > > ldomctl: requested VCPUs (256) larger than available resources (64) > ldomctl: requested memory (213674622976) larger than availableresources > (137428467712) I concur.
> Now that last message is a bit too long and I think those numbers look > a bit silly, so better would be: > > ldomctl: requested memory (203776M) larger than available resources (131062M) > > I think MB is the right unit. you could avaid a silly x > x by > rounding the requested memory up to the nearest MB. MB is the smallest common unit; also, as far as I can remember the specs, the hypervisor requires memory for domains to be somewhat aligned, e.g., a multiple of 128M or so; that is to say any "odd" amount of memory is unlikely to work anyway and printing errors with MB seems the most sanest approach. I also mentioned to kmos that we could make the error messages more user friendly: "resource_id larger than max_guests" might be grasped, but "resource_id larger than max_ldcs", etc. only seem confusing unless you know what logical domain channels are. So these should probably say something along the lines of "Too many domains defined, maximum is <max_guests>" or so.