search for: is_infl

Displaying 2 results from an estimated 2 matches for "is_infl".

Did you mean: is_incl
2008 Jan 08
1
[PATCH] QEMU KVM balloon support
...#include <pthread.h> #include <sys/utsname.h> +#include <sys/mman.h> extern void perror(const char *s); @@ -513,7 +514,74 @@ static int kvm_shutdown(void *opaque, in qemu_system_reset_request(); return 1; } - + +static int do_balloon_on_page(unsigned int gfn, int is_inflate) +{ + unsigned long addr = gfn * TARGET_PAGE_SIZE; + unsigned char *curr_addr = phys_ram_base + addr; + int r; + int advice = is_inflate ? MADV_DONTNEED : MADV_NORMAL; + + r = madvise(curr_addr, TARGET_PAGE_SIZE, advice); + + if (r < 0) { + perror("madvise&qu...
2008 Jan 08
1
[PATCH] QEMU KVM balloon support
...#include <pthread.h> #include <sys/utsname.h> +#include <sys/mman.h> extern void perror(const char *s); @@ -513,7 +514,74 @@ static int kvm_shutdown(void *opaque, in qemu_system_reset_request(); return 1; } - + +static int do_balloon_on_page(unsigned int gfn, int is_inflate) +{ + unsigned long addr = gfn * TARGET_PAGE_SIZE; + unsigned char *curr_addr = phys_ram_base + addr; + int r; + int advice = is_inflate ? MADV_DONTNEED : MADV_NORMAL; + + r = madvise(curr_addr, TARGET_PAGE_SIZE, advice); + + if (r < 0) { + perror("madvise&qu...