xen: fix booting ballooned down hvm guest
Subsystems (2)
Juergen Gross
maintainerPATCH 1/1 xen: fix booting ballooned down hvm guest
Commit 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.
For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
online new memory initially")
--- drivers/xen/xen-balloon.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
drivers/xen/xen-balloon.c +12 -6
@@ -57,7 +57,7 @@ static int register_balloon(struct device *dev);static void watch_target (struct xenbus_watch *watch,const char *path,const char *token) { -unsigned long long new_target; +unsigned long long new_target, static_max;int err;static bool watch_fired;static long target_diff;
@@ -72,13 +72,19 @@ static void watch_target(struct xenbus_watch *watch,* pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. */ new_target >>=PAGE_SHIFT -10 ; -if (watch_fired) { -balloon_set_new_target (new_target - target_diff); -return ; + +if (!watch_fired) { + watch_fired = true; + err =xenbus_scanf (XBT_NIL ,"memory" ,"static-max" ,"%llu" , + &static_max); +if (err !=1 ) + static_max = new_target; + static_max >>=PAGE_SHIFT -10 ; + target_diff =xen_pv_domain () ?0 + : static_max - balloon_stats.target_pages; } - watch_fired = true; - target_diff = new_target - balloon_stats.target_pages; +balloon_set_new_target (new_target - target_diff); }static struct xenbus_watch target_watch = { .node ="memory/target" ,
Signature · 1 line
2.12.3
Quoted 9 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Quoted 8 lines
Additionally we have to trigger the ballooning process at once.
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>
Quoted 22 lines
--- drivers/xen/xen-balloon.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)drivers/xen/xen-balloon.c +1
-2@@ -57,7 +57,7 @@ static int register_balloon(struct device *dev);static void watch_target (struct xenbus_watch *watch,const char *path,const char *token) { -unsigned long long new_target; +unsigned long long new_target, static_max;int err;static bool watch_fired;static long target_diff;@@ -72,13 +72,19 @@ static void watch_target(struct xenbus_watch *watch,* pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. */ new_target >>=PAGE_SHIFT -10 ; -if (watch_fired) {
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 82
Quoted 10 lines
drivers/xen/xen-balloon.c +8
-2-balloon_set_new_target (new_target - target_diff); -return ; + +if (!watch_fired) { + watch_fired = true; + err =xenbus_scanf (XBT_NIL ,"memory" ,"static-max" ,"%llu" , + &static_max); +if (err !=1 ) + static_max = new_target; + static_max >>=PAGE_SHIFT -10 ;
if you set static_max to new_target you've already done the shift, haven't you?
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 83
Quoted 1 line
drivers/xen/xen-balloon.c +1
-0+ target_diff = xen_pv_domain() ? 0
Why do we special-case PV?
-boris
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 90
Quoted 9 lines
drivers/xen/xen-balloon.c +2
-2+ : static_max - balloon_stats.target_pages; } - watch_fired = true; - target_diff = new_target - balloon_stats.target_pages; +balloon_set_new_target (new_target - target_diff); }static struct xenbus_watch target_watch = { .node ="memory/target" ,
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 9 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Quoted 8 lines
Additionally we have to trigger the ballooning process at once.
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>
Quoted 22 lines
--- drivers/xen/xen-balloon.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)drivers/xen/xen-balloon.c +1
-2@@ -57,7 +57,7 @@ static int register_balloon(struct device *dev);static void watch_target (struct xenbus_watch *watch,const char *path,const char *token) { -unsigned long long new_target; +unsigned long long new_target, static_max;int err;static bool watch_fired;static long target_diff;@@ -72,13 +72,19 @@ static void watch_target(struct xenbus_watch *watch,* pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. */ new_target >>=PAGE_SHIFT -10 ; -if (watch_fired) {
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 82
Quoted 10 lines
drivers/xen/xen-balloon.c +8
-2-balloon_set_new_target (new_target - target_diff); -return ; + +if (!watch_fired) { + watch_fired = true; + err =xenbus_scanf (XBT_NIL ,"memory" ,"static-max" ,"%llu" , + &static_max); +if (err !=1 ) + static_max = new_target; + static_max >>=PAGE_SHIFT -10 ;
if you set static_max to new_target you've already done the shift, haven't you?
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 83
Quoted 1 line
drivers/xen/xen-balloon.c +1
-0+ target_diff = xen_pv_domain() ? 0
Why do we special-case PV?
-boris
Quoted 9 lines
drivers/xen/xen-balloon.c +2
-2+ : static_max - balloon_stats.target_pages; } - watch_fired = true; - target_diff = new_target - balloon_stats.target_pages; +balloon_set_new_target (new_target - target_diff); }static struct xenbus_watch target_watch = { .node ="memory/target" ,
Juergen Gross
maintainerQuoted 12 lines · Boris Ostrovsky
Quoted 11 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Quoted 8 lines
Quoted 6 lines
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>
Hmm, is an anonymous Reported-by: tag okay?
Quoted 28 lines
Quoted 28 lines
--- drivers/xen/xen-balloon.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)drivers/xen/xen-balloon.c +4
-4@@ -57,7 +57,7 @@ static int register_balloon(struct device *dev);static void watch_target (struct xenbus_watch *watch,const char *path,const char *token) { -unsigned long long new_target; +unsigned long long new_target, static_max;int err;static bool watch_fired;static long target_diff;@@ -72,13 +72,19 @@ static void watch_target(struct xenbus_watch *watch,* pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. */ new_target >>=PAGE_SHIFT -10 ; -if (watch_fired) { -balloon_set_new_target (new_target - target_diff); -return ; + +if (!watch_fired) { + watch_fired = true;
Quoted 8 lines
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 82
Quoted 5 lines
drivers/xen/xen-balloon.c +5
-0+ err =xenbus_scanf (XBT_NIL ,"memory" ,"static-max" ,"%llu" , + &static_max); +if (err !=1 ) + static_max = new_target; + static_max >>=PAGE_SHIFT -10 ;if you set
static_maxtonew_targetyou've already done the shift, haven't you?
Aah, right. I moved reading static-max down into the if without adjustment after having it right at the start of the function initially. Thanks for catching this.
Quoted 3 lines
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 83
Quoted 1 line
drivers/xen/xen-balloon.c +1
-0+ target_diff = xen_pv_domain() ? 0Why do we special-case PV?
Because the initial value of balloon_stats.target_pages is special-cased for PV, too.
Juergen
Quoted 13 lines · Juergen Gross
Quoted 12 lines · Boris Ostrovsky
Quoted 11 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
-boris
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 13 lines · Juergen Gross
Quoted 12 lines · Boris Ostrovsky
Quoted 11 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Quoted 8 lines
Quoted 7 lines
Quoted 6 lines
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
-boris
Juergen Gross
maintainerQuoted 18 lines · Boris Ostrovsky
Quoted 17 lines · Juergen Gross
Quoted 16 lines · Boris Ostrovsky
Quoted 15 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
The docs say each tag should be:
tag: Full Name <email address> optional-other-stuff
I don't think HW42 can be regarded to be a full name.
Juergen
Juergen Gross:
Quoted 24 lines · Boris Ostrovsky
Quoted 23 lines · Juergen Gross
Quoted 21 lines · Boris Ostrovsky
Quoted 12 lines · Juergen Gross
Quoted 11 lines
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Quoted 7 lines
Quoted 6 lines
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Quoted 8 lines
Quoted 2 lines
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
The docs say each tag should be:
tag: Full Name <email address> optional-other-stuff
I don't think HW42 can be regarded to be a full name.
I think you really should allow pseudonymous contributions. But in my case my nickname is anyway linked to my legal name so fell free to use:
Simon Gaiser <[email protected]>
Juergen Gross
maintainerQuoted 30 lines · On 24/10/17 16:59, HW42 wrote:
Juergen Gross:
Quoted 29 lines · Boris Ostrovsky
Quoted 18 lines · Juergen Gross
Quoted 17 lines · Boris Ostrovsky
Quoted 16 lines · Juergen Gross
Quoted 15 lines
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
The docs say each tag should be:
Quoted 8 lines
Quoted 3 lines
tag: Full Name <email address> optional-other-stuff
I don't think HW42 can be regarded to be a full name.
I think you really should allow pseudonymous contributions. But in my case my nickname is anyway linked to my legal name so fell free to use:
Simon Gaiser <[email protected]>
Thanks, will add it in V2.
Juergen
Juergen Gross
maintainerQuoted 30 lines · On 24/10/17 16:59, HW42 wrote:
Juergen Gross:
Quoted 29 lines · Boris Ostrovsky
Quoted 18 lines · Juergen Gross
Quoted 17 lines · Boris Ostrovsky
Quoted 16 lines · Juergen Gross
Quoted 15 lines
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
The docs say each tag should be:
Quoted 8 lines
Quoted 3 lines
tag: Full Name <email address> optional-other-stuff
I don't think HW42 can be regarded to be a full name.
I think you really should allow pseudonymous contributions. But in my case my nickname is anyway linked to my legal name so fell free to use:
Simon Gaiser <[email protected]>
Thanks, will add it in V2.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 3 lines · On Tue, Oct 24, 2017 at 02:59:00PM +0000, HW42 wrote:
I think you really should allow pseudonymous contributions. But in my case my nickname is anyway linked to my legal name so fell free to use:
Simon Gaiser <[email protected]>
I personally always have difficulties with pseudos in emails, I think it's just a matter of respect for all other contributors. It's easier to write to a contributor using "Simon what's your opinion" than "XW;75_@!XVn what's your opinion". Just like your boss probably doesn't call you "HW42", it's understandable that the people having to deal with your work might prefer to call you with your real name as well.
Willy
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Quoted 3 lines · On Tue, Oct 24, 2017 at 02:59:00PM +0000, HW42 wrote:
I think you really should allow pseudonymous contributions. But in my case my nickname is anyway linked to my legal name so fell free to use:
Simon Gaiser <[email protected]>
I personally always have difficulties with pseudos in emails, I think it's just a matter of respect for all other contributors. It's easier to write to a contributor using "Simon what's your opinion" than "XW;75_@!XVn what's your opinion". Just like your boss probably doesn't call you "HW42", it's understandable that the people having to deal with your work might prefer to call you with your real name as well.
Willy
Juergen Gross:
Quoted 24 lines · Boris Ostrovsky
Quoted 23 lines · Juergen Gross
Quoted 21 lines · Boris Ostrovsky
Quoted 12 lines · Juergen Gross
Quoted 11 lines
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Quoted 7 lines
Quoted 6 lines
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Quoted 8 lines
Quoted 2 lines
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
The docs say each tag should be:
tag: Full Name <email address> optional-other-stuff
I don't think HW42 can be regarded to be a full name.
I think you really should allow pseudonymous contributions. But in my case my nickname is anyway linked to my legal name so fell free to use:
Simon Gaiser <[email protected]>
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Juergen Gross
maintainerQuoted 18 lines · Boris Ostrovsky
Quoted 17 lines · Juergen Gross
Quoted 16 lines · Boris Ostrovsky
Quoted 15 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Quoted 7 lines
Quoted 4 lines
Quoted 3 lines
Quoted 2 lines
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>Hmm, is an anonymous Reported-by: tag okay?
Oh, I don't know what the rules are for this kind of address. I'd probably still add it but it's up to you.
The docs say each tag should be:
tag: Full Name <email address> optional-other-stuff
I don't think HW42 can be regarded to be a full name.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel
Juergen Gross
maintainerQuoted 12 lines · Boris Ostrovsky
Quoted 11 lines · Juergen Gross
Commit
96edd61dcf44362d3ef0bed1a5361e0ac7886a63("xen/balloon: don't online new memory initially") introduced a regression when booting a HVM domain with memory less than mem-max: instead of ballooning down immediately the system would try to use the memory up to mem-max resulting in Xen crashing the domain.For HVM domains the current size will be reflected in Xenstore node memory/static-max instead of memory/target.
Additionally we have to trigger the ballooning process at once.
Quoted 8 lines
Quoted 6 lines
Cc <[email protected]> # 4.13Fixes 96edd61dcf44362d3ef0bed1a5361e0ac7886a63 ("xen/balloon: don'tonline new memory initially")
Suggested-by Boris Ostrovsky <[email protected]>Signed-off-by Juergen Gross <[email protected]>Reported-by HW42 <[email protected]>
Hmm, is an anonymous Reported-by: tag okay?
Quoted 28 lines
Quoted 28 lines
--- drivers/xen/xen-balloon.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)drivers/xen/xen-balloon.c +4
-4@@ -57,7 +57,7 @@ static int register_balloon(struct device *dev);static void watch_target (struct xenbus_watch *watch,const char *path,const char *token) { -unsigned long long new_target; +unsigned long long new_target, static_max;int err;static bool watch_fired;static long target_diff;@@ -72,13 +72,19 @@ static void watch_target(struct xenbus_watch *watch,* pages. PAGE_SHIFT converts bytes to pages, hence PAGE_SHIFT - 10. */ new_target >>=PAGE_SHIFT -10 ; -if (watch_fired) { -balloon_set_new_target (new_target - target_diff); -return ; + +if (!watch_fired) { + watch_fired = true;
Quoted 8 lines
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 82
Quoted 5 lines
drivers/xen/xen-balloon.c +5
-0+ err =xenbus_scanf (XBT_NIL ,"memory" ,"static-max" ,"%llu" , + &static_max); +if (err !=1 ) + static_max = new_target; + static_max >>=PAGE_SHIFT -10 ;if you set
static_maxtonew_targetyou've already done the shift, haven't you?
Aah, right. I moved reading static-max down into the if without adjustment after having it right at the start of the function initially. Thanks for catching this.
Quoted 3 lines
drivers/xen/xen-balloon.c static void watch_target(struct xenbus_watch *watch, · line 83
Quoted 1 line
drivers/xen/xen-balloon.c +1
-0+ target_diff = xen_pv_domain() ? 0Why do we special-case PV?
Because the initial value of balloon_stats.target_pages is special-cased for PV, too.
Juergen
_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel