From: George Dunlap Subject: [PATCH][RFC] Parameter name change for xc_*_build functions Date: Mon, 16 Mar 2009 15:50:50 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary=001485f4225e28314c04653e6af2 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 --001485f4225e28314c04653e6af2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit [Purely a cosmetic change.] It's been pointed out that the "memory" parameter names in tools/libxc/xenguest.h aren't very consistent between linux and HVM, and may confuse people setting up ballooning systems. Ballooning systems generally have a parameter like "static_max", which is the maximum memory the VM will ever have, and "target" which is the memory we want it to have right now (somewhere between dynamic_max and dynamic_min). The attached patch changes the parameter names to make them consistent with what someone building such a system might use: * When building a PV Linux VM, since we can expand the memory whenever we wish, we pass in "start_mem_mb". This corresponds to "target". * When building an HVM VM with xc_hvm_build(), since we cannot grow larger than the initial amount of memory at boot, we pass in "max_mem_mb". This corresponds to "static_max". The balloon driver can then be used after boot to balloon down to target. * When building an HVM VM with xc_hvm_build_target_mem(), we pass both parameters: "max_mem_mb" (which corresponds to "static_max") and "start_mem_mb" (which corresponds to target). Thoughts? -George Dunlap --001485f4225e28314c04653e6af2 Content-Type: text/x-diff; charset=US-ASCII; name="parameter-names.diff" Content-Disposition: attachment; filename="parameter-names.diff" Content-Transfer-Encoding: base64 X-Attachment-Id: f_fsdc0ffi0 ZGlmZiAtciBjNjM3YWY2NGVmZmUgdG9vbHMvbGlieGMveGVuZ3Vlc3QuaAotLS0gYS90b29scy9s aWJ4Yy94ZW5ndWVzdC5oCUZyaSBNYXIgMTMgMTE6MTU6MTMgMjAwOSArMDAwMAorKysgYi90b29s cy9saWJ4Yy94ZW5ndWVzdC5oCU1vbiBNYXIgMTYgMTU6MzQ6MjUgMjAwOSArMDAwMApAQCAtNTMs NyArNTMsNyBAQAogICoKICAqIEBwYXJtIHhjX2hhbmRsZSBhIGhhbmRsZSB0byBhbiBvcGVuIGh5 cGVydmlzb3IgaW50ZXJmYWNlCiAgKiBAcGFybSBkb21pZCB0aGUgaWQgb2YgdGhlIGRvbWFpbgot ICogQHBhcm0gbWVtX21iIG1lbW9yeSBzaXplIGluIG1lZ2FieXRlcworICogQHBhcm0gc3RhcnRf bWVtX21iIGluaXRpYWwgbWVtb3J5IHNpemUgaW4gbWVnYWJ5dGVzCiAgKiBAcGFybSBpbWFnZV9u YW1lIG5hbWUgb2YgdGhlIGtlcm5lbCBpbWFnZSBmaWxlCiAgKiBAcGFybSByYW1kaXNrX25hbWUg bmFtZSBvZiB0aGUgcmFtZGlzayBpbWFnZSBmaWxlCiAgKiBAcGFybSBjbWRsaW5lIGNvbW1hbmQg bGluZSBzdHJpbmcKQEAgLTY2LDcgKzY2LDcgQEAKICAqLwogaW50IHhjX2xpbnV4X2J1aWxkKGlu dCB4Y19oYW5kbGUsCiAgICAgICAgICAgICAgICAgICAgdWludDMyX3QgZG9taWQsCi0gICAgICAg ICAgICAgICAgICAgdW5zaWduZWQgaW50IG1lbV9tYiwKKyAgICAgICAgICAgICAgICAgICB1bnNp Z25lZCBpbnQgc3RhcnRfbWVtX21iLAogICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoYXIgKmlt YWdlX25hbWUsCiAgICAgICAgICAgICAgICAgICAgY29uc3QgY2hhciAqcmFtZGlza19uYW1lLAog ICAgICAgICAgICAgICAgICAgIGNvbnN0IGNoYXIgKmNtZGxpbmUsCkBAIC04Miw3ICs4Miw3IEBA CiBpbnQgeGNfZG9tX2xpbnV4X2J1aWxkKGludCB4Y19oYW5kbGUsCiAJCSAgICAgICBzdHJ1Y3Qg eGNfZG9tX2ltYWdlICpkb20sCiAJCSAgICAgICB1aW50MzJfdCBkb21pZCwKLQkJICAgICAgIHVu c2lnbmVkIGludCBtZW1fbWIsCisJCSAgICAgICB1bnNpZ25lZC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F9idWZmZXIsCkBAIC0xMjcsMTggKzEyNywxOCBAQAogCiBpbnQgeGNf aHZtX2J1aWxkKGludCB4Y19oYW5kbGUsCiAgICAgICAgICAgICAgICAgIHVpbnQzMl90IGRvbWlk LAotICAgICAgICAgICAgICAgICBpbnQgbWVtc2l6ZSwKKyAgICAgICAgICAgICAgICAgaW50IG1h eF9tZW1fbWIsCiAgICAgICAgICAgICAgICAgIGNvbnN0IGNoYXIgKmltYWdlX25hbWUpOwogCiBp bnQgeGNfaHZtX2J1aWxkX3RhcmdldF9tZW0oaW50IHhjX2hhbmRsZSwKICAgICAgICAgICAgICAg ICAgICAgICAgICAgICB1aW50MzJfdCBkb21pZCwKLSAgICAgICAgICAgICAgICAgICAgICAgICAg ICBpbnQgbWVtc2l6ZSwKLSAgICAgICAgICAgICAgICAgICAgICAgICAgICBpbnQgdGFyZ2V0LAor ICAgICAgICAgICAgICAgICAgICAgICAgICAgIGludCBtYXhfbWVtX21iLAorICAgICAgICAgICAg ICAgICAgICAgICAgICAgIGludCBzdGFydF9tZW1fbWIsCiAgICAgICAgICAgICAgICAgICAgICAg ICAgICAgY29uc3QgY2hhciAqaW1hZ2VfbmFtZSk7CiAKIGludCB4Y19odm1fYnVpbGRfbWVtKGlu dCB4Y19oYW5kbGUsCiAgICAgICAgICAgICAgICAgICAgICB1aW50MzJfdCBkb21pZCwKLSAgICAg ICAgICAgICAgICAgICAgIGludCBtZW1zaXplLAorICAgICAgICAgICAgICAgICAgICAgaW50IG1h eF9tZW1fbWIsCiAgICAgICAgICAgICAgICAgICAgICBjb25zdCBjaGFyICppbWFnZV9idWZmZXIs CiAgICAgICAgICAgICAgICAgICAgICB1bnNpZ25lZCBsb25nIGltYWdlX3NpemUpOwogCg== --001485f4225e28314c04653e6af2 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 --001485f4225e28314c04653e6af2--