Skip to contentSkip to conversation

virtio-balloon: Remove needless precompiled directive

PATCH In review Liang Li 3 participants 4 messages Aug 9, 2016 – Sep 29, 2016

lore
Share & tools
lore

Liang Li

author
#0 lore raw

PATCH 1/1 virtio-balloon: Remove needless precompiled directive

Since there in wrapper around madvise(), the virtio-balloon code is able to work without the precompiled directive, the directive can be removed.

---
 hw/virtio/virtio-balloon.c | 2 --
 1 file changed, 2 deletions(-)
hw/virtio/virtio-balloon.c +0 -2
index 5af429a..61325f2 100644
@@ -34,13 +34,11 @@
 
 static void balloon_page(void *addr, int deflate)
 {
-#if defined(__linux__)
     if (!qemu_balloon_is_inhibited() && (!kvm_enabled() ||
                                          kvm_has_sync_mmu())) {
         qemu_madvise(addr, BALLOON_PAGE_SIZE,
                 deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED);
     }
-#endif
 }
 
 static const char *balloon_stat_names[] = {
Signature · 1 line
1.9.1
#1 lore raw
Quoted 7 lines · Liang Li

Since there in wrapper around madvise(), the virtio-balloon code is able to work without the precompiled directive, the directive can be removed.

Sorry about missing this earlier. I'm inclined to merge this past 2.7 now. Sorry about the delay.
Can you pls repost after 2.7 is out?

Thanks!

Quoted 24 lines
---
 hw/virtio/virtio-balloon.c | 2 --
 1 file changed, 2 deletions(-)
hw/virtio/virtio-balloon.c +0 -2
index 5af429a..61325f2 100644
@@ -34,13 +34,11 @@
 
 static void balloon_page(void *addr, int deflate)
 {
-#if defined(__linux__)
     if (!qemu_balloon_is_inhibited() && (!kvm_enabled() ||
                                          kvm_has_sync_mmu())) {
         qemu_madvise(addr, BALLOON_PAGE_SIZE,
                 deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED);
     }
-#endif
 }
 
 static const char *balloon_stat_names[] = {
Signature · 1 line
1.9.1
#2 lore raw
Quoted 9 lines · Liang Li
Quoted 7 lines

Since there in wrapper around madvise(), the virtio-balloon code is able to work without the precompiled directive, the directive can be removed.

Quoted 6 lines

Sorry about missing this earlier. I'm inclined to merge this past 2.7 now. Sorry about the delay.
Can you pls repost after 2.7 is out?

Thanks!

Of course, I will repost then.

Liang

#3 lore raw
In reply to Michael S. Tsirkin
Quoted 9 lines · Michael S. Tsirkin
Quoted 7 lines · Liang Li

Since there in wrapper around madvise(), the virtio-balloon code is able to work without the precompiled directive, the directive can be removed.

Quoted 6 lines

Sorry about missing this earlier. I'm inclined to merge this past 2.7 now. Sorry about the delay.
Can you pls repost after 2.7 is out?

Thanks!

Ping?

Quoted 24 lines
Quoted 24 lines
---
 hw/virtio/virtio-balloon.c | 2 --
 1 file changed, 2 deletions(-)
hw/virtio/virtio-balloon.c +0 -2
index 5af429a..61325f2 100644
@@ -34,13 +34,11 @@
 
 static void balloon_page(void *addr, int deflate)
 {
-#if defined(__linux__)
     if (!qemu_balloon_is_inhibited() && (!kvm_enabled() ||
                                          kvm_has_sync_mmu())) {
         qemu_madvise(addr, BALLOON_PAGE_SIZE,
                 deflate ? QEMU_MADV_WILLNEED : QEMU_MADV_DONTNEED);
     }
-#endif
 }
 
 static const char *balloon_stat_names[] = {
Signature · 1 line
1.9.1