On Fri, 20 Jul 2007 05:00:41 -0400 Daniel Veillard wrote:
On Fri, Jul 20, 2007 at 05:17:34PM +0900, Saori Fukuta wrote:
> The schedinfo command said strange message.
> # virsh schedinfo 25 --weight 0
> libvir: Xen error : invalid argument in xenHypervisorSetSchedulerParameters:
> Credit scheduler weight parameter (%d) is out of range (1-65535)
> ^^^^here
> # virsh schedinfo 25 --cap -1
> libvir: Xen error : invalid argument in xenHypervisorSetSchedulerParameters:
> Credit scheduler cap parameter (%d) is out of range (0-65535)
> ^^^^here
>
That would be nicer, we have the information and don't pass it to the user.
It may not be a big gain when used purely from virsh but for future automatic
tuning tools it may be interesting to get the value reported back. An
snprintf to a local buffer to generate the string may be sufficient. I
didn't applied remove_perD.patch for this reason, if you send another
patch I will fix this or I could just do it.
OK, I understand the purpose of passing it.
I simply added snprintf. How about this ?
# ./virsh schedinfo 25 --weight 0
libvir: Xen error : invalid argument in xenHypervisorSetSchedulerParameters:
Credit scheduler weight parameter (0) is out of range (1-65535)
# ./virsh schedinfo 25 --cap -1
libvir: Xen error : invalid argument in xenHypervisorSetSchedulerParameters:
Credit scheduler cap parameter (-1) is out of range (0-65535)
> And I found some wrong code when I was checking about error
message.
> So I fix them, but if I have a misunderstanding of them, please tell me. :-)
> o I guess 10th argument of __virRaiseError should be specified the number
> of the line. But the value, for example which is number of heypercall,
> is sometimes specified.
Well not really it's just str1 - str3/int1 - int2 are just extra
informations. This is intended to populate the virError fields to be used
for more precise error handling than the default one.
There is still some point of the patch which make sense, for example
adding value at the end of the argument list in virXenError(), I will apply
some of those but not remove the tenth value.
Thank you for explaining !
Saori.