diff mbox

[repost] virtio-balloon: Remove needless precompiled directive

Message ID 1470702642-24580-1-git-send-email-liang.z.li@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Liang Li Aug. 9, 2016, 12:30 a.m. UTC
Since there in wrapper around madvise(), the virtio-balloon
code is able to work without the precompiled directive, the
directive can be removed.

Signed-off-by: Liang Li <liang.z.li@intel.com>
Suggested-by: Thomas Huth <thuth@redhat.com>
Reviewd-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
---
 hw/virtio/virtio-balloon.c | 2 --
 1 file changed, 2 deletions(-)

Comments

Michael S. Tsirkin Aug. 10, 2016, 3:38 p.m. UTC | #1
On Tue, Aug 09, 2016 at 08:30:42AM +0800, Liang Li wrote:
> Since there in wrapper around madvise(), the virtio-balloon
> code is able to work without the precompiled directive, the
> directive can be removed.
> 
> Signed-off-by: Liang Li <liang.z.li@intel.com>
> Suggested-by: Thomas Huth <thuth@redhat.com>
> Reviewd-by: Dr. David Alan Gilbert <dgilbert@redhat.com>

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!

> ---
>  hw/virtio/virtio-balloon.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
> index 5af429a..61325f2 100644
> --- a/hw/virtio/virtio-balloon.c
> +++ b/hw/virtio/virtio-balloon.c
> @@ -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[] = {
> -- 
> 1.9.1
Liang Li Aug. 11, 2016, 12:34 a.m. UTC | #2
> On Tue, Aug 09, 2016 at 08:30:42AM +0800, Liang Li wrote:
> > Since there in wrapper around madvise(), the virtio-balloon code is
> > able to work without the precompiled directive, the directive can be
> > removed.
> >
> > Signed-off-by: Liang Li <liang.z.li@intel.com>
> > Suggested-by: Thomas Huth <thuth@redhat.com>
> > Reviewd-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> 
> 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
Thomas Huth Sept. 29, 2016, 10:57 a.m. UTC | #3
On 10.08.2016 17:38, Michael S. Tsirkin wrote:
> On Tue, Aug 09, 2016 at 08:30:42AM +0800, Liang Li wrote:
>> Since there in wrapper around madvise(), the virtio-balloon
>> code is able to work without the precompiled directive, the
>> directive can be removed.
>>
>> Signed-off-by: Liang Li <liang.z.li@intel.com>
>> Suggested-by: Thomas Huth <thuth@redhat.com>
>> Reviewd-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
> 
> 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?

>> ---
>>  hw/virtio/virtio-balloon.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
>> index 5af429a..61325f2 100644
>> --- a/hw/virtio/virtio-balloon.c
>> +++ b/hw/virtio/virtio-balloon.c
>> @@ -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[] = {
>> -- 
>> 1.9.1
diff mbox

Patch

diff --git a/hw/virtio/virtio-balloon.c b/hw/virtio/virtio-balloon.c
index 5af429a..61325f2 100644
--- a/hw/virtio/virtio-balloon.c
+++ b/hw/virtio/virtio-balloon.c
@@ -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[] = {