From: Masaki Kanno Subject: [PATCH] Fix sched commands for when wrong domain is given Date: Wed, 31 Jan 2007 11:28:39 +0900 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary-l11ReJMeDhAZqpQaoCfFX" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-l11ReJMeDhAZqpQaoCfFX Content-Type: text/plain; charset=iso-2022-jp Content-Transfer-Encoding: 7bit Content-Description: Mail message body Hi, I found strange issues. I gave a wrong domain name to the xm sched commands. The xm sched commands only showed the header at that time. And the xm sched-sedf command did not become an error when I tried to set scheduler parameters. # xm sched-credit -d Nonexistent-domain Name ID Weight Cap # xm sched-sedf Nonexistent-domain Name ID Period(ms) Slice(ms) Lat(ms) Extra Weight # xm sched-sedf Nonexistent-domain -w 10 # I fixed it. When the wrong domain name is given, the xm sched commands show the following error messages. # xm sched-credit -d Nonexistent-domain Error: Domain 'Nonexistent-domain' does not exist. Usage: xm sched-credit [-d [-w[=WEIGHT]|-c[=CAP]]] Get/set credit scheduler parameters. -d DOMAIN, --domain=DOMAIN Domain to modify -w WEIGHT, --weight=WEIGHT Weight (int) -c CAP, --cap=CAP Cap (int) # xm sched-sedf Nonexistent-domain Error: Domain 'Nonexistent-domain' does not exist. Usage: xm sched-sedf [options] Get/set EDF parameters. -p [MS], --period[=MS] Relative deadline(ms) -s [MS], --slice[=MS] Worst-case execution time(ms). (slice < period) -l [MS], --latency[=MS] Scaled period (ms) when domain performs heavy I/O -e [FLAG], --extra[=FLAG] Flag (0 or 1) controls if domain can run in extra time. -w [FLOAT], --weight[=FLOAT] CPU Period/slice (do not set with --period/--slice) # xm sched-sedf Nonexistent-domain -w 10 Error: Domain 'Nonexistent-domain' does not exist. Usage: xm sched-sedf [options] Get/set EDF parameters. -p [MS], --period[=MS] Relative deadline(ms) -s [MS], --slice[=MS] Worst-case execution time(ms). (slice < period) -l [MS], --latency[=MS] Scaled period (ms) when domain performs heavy I/O -e [FLAG], --extra[=FLAG] Flag (0 or 1) controls if domain can run in extra time. -w [FLOAT], --weight[=FLOAT] CPU Period/slice (do not set with --period/--slice) Signed-off-by: Masaki Kanno Best regards, Kan --Boundary-l11ReJMeDhAZqpQaoCfFX Content-Type: application/octet-stream; name="xm_sched_2.patch" Content-Disposition: attachment; filename="xm_sched_2.patch" Content-Transfer-Encoding: base64 ZGlmZiAtciA1ZThkYTA2NjNmZjggdG9vbHMvcHl0aG9uL3hlbi94bS9tYWluLnB5Ci0tLSBh L3Rvb2xzL3B5dGhvbi94ZW4veG0vbWFpbi5weQlUdWUgSmFuIDMwIDAxOjIzOjU4IDIwMDcg KzAwMDAKKysrIGIvdG9vbHMvcHl0aG9uL3hlbi94bS9tYWluLnB5CVdlZCBKYW4gMzEgMDM6 NTU6MjkgMjAwNyArMDkwMApAQCAtMTE0NCw2ICsxMTQ0LDkgQEAgZGVmIHhtX3NjaGVkX3Nl ZGYoYXJncyk6CiAgICAgZG9tcyA9IGZpbHRlcihsYW1iZGEgeCA6IGRvbWlkX21hdGNoKGRv bWlkLCB4KSwKICAgICAgICAgICAgICAgICAgICAgICAgIFtwYXJzZV9kb21zX2luZm8oZG9t KQogICAgICAgICAgICAgICAgICAgICAgICAgIGZvciBkb20gaW4gZ2V0RG9tYWlucyhOb25l LCAncnVubmluZycpXSkKKyAgICBpZiBkb21pZCBpcyBub3QgTm9uZSBhbmQgZG9tcyA9PSBb XTogCisgICAgICAgIGVycigiRG9tYWluICclcycgZG9lcyBub3QgZXhpc3QuIiAlIGRvbWlk KQorICAgICAgICB1c2FnZSgnc2NoZWQtc2VkZicpCiAKICAgICAjIHByaW50IGhlYWRlciBp ZiB3ZSBhcmVuJ3Qgc2V0dGluZyBhbnkgcGFyYW1ldGVycwogICAgIGlmIGxlbihvcHRzLmtl eXMoKSkgPT0gMDoKQEAgLTEyMDcsNiArMTIxMCw5IEBAIGRlZiB4bV9zY2hlZF9jcmVkaXQo YXJncyk6CiAgICAgICAgICAgICAgICAgICBmb3IgZG9tIGluIGdldERvbWFpbnMoTm9uZSwg J3J1bm5pbmcnKV0pCiAKICAgICBpZiB3ZWlnaHQgaXMgTm9uZSBhbmQgY2FwIGlzIE5vbmU6 CisgICAgICAgIGlmIGRvbWlkIGlzIG5vdCBOb25lIGFuZCBkb21zID09IFtdOiAKKyAgICAg ICAgICAgIGVycigiRG9tYWluICclcycgZG9lcyBub3QgZXhpc3QuIiAlIGRvbWlkKQorICAg ICAgICAgICAgdXNhZ2UoJ3NjaGVkLWNyZWRpdCcpCiAgICAgICAgICMgcHJpbnQgaGVhZGVy IGlmIHdlIGFyZW4ndCBzZXR0aW5nIGFueSBwYXJhbWV0ZXJzCiAgICAgICAgIHByaW50ICcl LTMzcyAlLTJzICUtNnMgJS00cycgJSAoJ05hbWUnLCdJRCcsJ1dlaWdodCcsJ0NhcCcpCiAg ICAgICAgIAo= --Boundary-l11ReJMeDhAZqpQaoCfFX Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-l11ReJMeDhAZqpQaoCfFX--