search for: madv_normal

Displaying 3 results from an estimated 3 matches for "madv_normal".

2003 Oct 02
1
another Dovecot problem
Hi All-- First, thanks to Timo for solving my last issue. I got dovecot up and running on one of my machines, and it does exactly what I want. Now I'm trying to install dovecot on an older box (glibc 2.0.7 Linux kernel 2.0.36), and encountering some problems: -- firstly autoconf/automake does not seem to correctly deal with the madvise function on this system. It detects that we don't
2008 Jan 08
1
[PATCH] QEMU KVM balloon support
...*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"); + fprintf(stderr, "%s: gfn=0x%x is_inflate=%d mlock/madvise: failed\n", + __FUNCTION__, gfn, is_inflate); + } + return r; +} + +int kvm_ha...
2008 Jan 08
1
[PATCH] QEMU KVM balloon support
...*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"); + fprintf(stderr, "%s: gfn=0x%x is_inflate=%d mlock/madvise: failed\n", + __FUNCTION__, gfn, is_inflate); + } + return r; +} + +int kvm_ha...