Skip to contentSkip to conversation

mm/balloon_compaction: suppress allocation warnings

PATCH Superseded Nadav Amit 4 participants 13 messages Aug 20, 2019 – Sep 4, 2019

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Nadav Amit

author
#0 lore raw

PATCH 1/1 mm/balloon_compaction: suppress allocation warnings

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

---
 mm/balloon_compaction.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mm/balloon_compaction.c +2 -1
index 798275a51887..26de020aae7b 100644
@@ -124,7 +124,8 @@ EXPORT_SYMBOL_GPL(balloon_page_list_dequeue);
 struct page *balloon_page_alloc(void)
 {
 	struct page *page = alloc_page(balloon_mapping_gfp_mask() |
-				       __GFP_NOMEMALLOC | __GFP_NORETRY);
+				       __GFP_NOMEMALLOC | __GFP_NORETRY |
+				       __GFP_NOWARN);
 	return page;
 }
 EXPORT_SYMBOL_GPL(balloon_page_alloc);
Signature · 1 line
2.19.1
#1 lore raw
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Quoted 22 lines
---
 mm/balloon_compaction.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mm/balloon_compaction.c +2 -1
index 798275a51887..26de020aae7b 100644
@@ -124,7 +124,8 @@ EXPORT_SYMBOL_GPL(balloon_page_list_dequeue);
 struct page *balloon_page_alloc(void)
 {
 	struct page *page = alloc_page(balloon_mapping_gfp_mask() |
-				       __GFP_NOMEMALLOC | __GFP_NORETRY);
+				       __GFP_NOMEMALLOC | __GFP_NORETRY |
+				       __GFP_NOWARN);
 	return page;
 }
 EXPORT_SYMBOL_GPL(balloon_page_alloc);
Signature · 3 lines
Thanks,

David / dhildenb
#2 lore raw
In reply to Nadav Amit
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Quoted 22 lines
---
 mm/balloon_compaction.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
mm/balloon_compaction.c +2 -1
index 798275a51887..26de020aae7b 100644
@@ -124,7 +124,8 @@ EXPORT_SYMBOL_GPL(balloon_page_list_dequeue);
 struct page *balloon_page_alloc(void)
 {
 	struct page *page = alloc_page(balloon_mapping_gfp_mask() |
-				       __GFP_NOMEMALLOC | __GFP_NORETRY);
+				       __GFP_NOMEMALLOC | __GFP_NORETRY |
+				       __GFP_NOWARN);
 	return page;
 }
 EXPORT_SYMBOL_GPL(balloon_page_alloc);
Signature · 3 lines
Thanks,

David / dhildenb
author
#3 lore raw
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

How about using __GFP_NOWARN, and if allocation do something like:

  pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#4 lore raw
Quoted 18 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

Quoted 7 lines

How about using __GFP_NOWARN, and if allocation do something like:

  pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

And yes, this would certainly be nicer.

Signature · 7 lines
Thanks,

David / dhildenb
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
#5 lore raw
In reply to Nadav Amit
Quoted 18 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

Quoted 7 lines

How about using __GFP_NOWARN, and if allocation do something like:

  pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

And yes, this would certainly be nicer.

Signature · 3 lines
Thanks,

David / dhildenb
#6 lore raw
Quoted 23 lines · David Hildenbrand
Quoted 20 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

How about using __GFP_NOWARN, and if allocation do something like:

Quoted 8 lines
Quoted 4 lines

pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

And yes, this would certainly be nicer.

Thanks. I will post v2 of the patch.

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

author
#7 lore raw
In reply to David Hildenbrand
Quoted 23 lines · David Hildenbrand
Quoted 20 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

How about using __GFP_NOWARN, and if allocation do something like:

Quoted 8 lines
Quoted 4 lines

pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

And yes, this would certainly be nicer.

Thanks. I will post v2 of the patch.

Reviewed-by
#8 lore raw
Quoted 25 lines · Nadav Amit
Quoted 25 lines · David Hildenbrand
Quoted 22 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

How about using __GFP_NOWARN, and if allocation do something like:

pr_warn(“Balloon memory allocation failed”);

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

And yes, this would certainly be nicer.

Thanks. I will post v2 of the patch.

As discussed in v2, we already print a warning in virtio-balloon, so I am fine with this patch.

Signature · 7 lines
Thanks,

David / dhildenb
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
Reviewed-by
#9 lore raw
In reply to Nadav Amit
Quoted 25 lines · Nadav Amit
Quoted 25 lines · David Hildenbrand
Quoted 22 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

How about using __GFP_NOWARN, and if allocation do something like:

pr_warn(“Balloon memory allocation failed”);

Quoted 9 lines
Quoted 6 lines
Quoted 2 lines

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

And yes, this would certainly be nicer.

Thanks. I will post v2 of the patch.

As discussed in v2, we already print a warning in virtio-balloon, so I am fine with this patch.

Signature · 3 lines
Thanks,

David / dhildenb
author
#10 lore raw
Quoted 33 lines · David Hildenbrand
Quoted 30 lines · Nadav Amit
Quoted 30 lines · David Hildenbrand
Quoted 18 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

Quoted 6 lines

How about using __GFP_NOWARN, and if allocation do something like:

pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

And yes, this would certainly be nicer.

Thanks. I will post v2 of the patch.

As discussed in v2, we already print a warning in virtio-balloon, so I am fine with this patch.

Michael,

If it is possible to get it to 5.3, to avoid behavioral change for VMware balloon users, it would be great.

Thanks,
Nadav
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#11 lore raw
Quoted 42 lines · Nadav Amit
Quoted 33 lines · David Hildenbrand
Quoted 30 lines · Nadav Amit
Quoted 30 lines · David Hildenbrand
Quoted 18 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

Quoted 6 lines

How about using __GFP_NOWARN, and if allocation do something like:

pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

And yes, this would certainly be nicer.

Thanks. I will post v2 of the patch.

As discussed in v2, we already print a warning in virtio-balloon, so I am fine with this patch.

Quoted 7 lines

Michael,

If it is possible to get it to 5.3, to avoid behavioral change for VMware balloon users, it would be great.

Thanks,
Nadav

Just back from vacation, I'll try.

_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

#12 lore raw
In reply to Nadav Amit
Quoted 42 lines · Nadav Amit
Quoted 33 lines · David Hildenbrand
Quoted 30 lines · Nadav Amit
Quoted 30 lines · David Hildenbrand
Quoted 18 lines · Nadav Amit
Quoted 9 lines · David Hildenbrand
Quoted 5 lines · Nadav Amit

There is no reason to print warnings when balloon page allocation fails, as they are expected and can be handled gracefully. Since VMware balloon now uses balloon-compaction infrastructure, and suppressed these warnings before, it is also beneficial to suppress these warnings to keep the same behavior that the balloon had before.

Quoted 5 lines

I am not sure if that's a good idea. The allocation warnings are usually the only trace of "the user/admin did something bad because he/she tried to inflate the balloon to an unsafe value". Believe me, I processed a couple of such bugreports related to virtio-balloon and the warning were very helpful for that.

Ok, so a message is needed, but does it have to be a generic frightening warning?

Quoted 6 lines

How about using __GFP_NOWARN, and if allocation do something like:

pr_warn(“Balloon memory allocation failed”);

Or even something more informative? This would surely be less intimidating for common users.

ratelimit would make sense :)

Quoted 8 lines
Quoted 3 lines
Quoted 1 line

And yes, this would certainly be nicer.

Thanks. I will post v2 of the patch.

As discussed in v2, we already print a warning in virtio-balloon, so I am fine with this patch.

Quoted 7 lines

Michael,

If it is possible to get it to 5.3, to avoid behavioral change for VMware balloon users, it would be great.

Thanks,
Nadav

Just back from vacation, I'll try.