Re: madvise() not triggering page discard with MMU-notifiers

2008-08-28 Thread Anthony Liguori
Andrea Arcangeli wrote: On Mon, Aug 18, 2008 at 05:04:25PM -0500, Anthony Liguori wrote: +if (!kvm_enabled() || !qemu_kvm_has_mmu_notifiers()) +madvise(addr, TARGET_PAGE_SIZE, +deflate ? MADV_WILLNEED : MADV_DONTNEED); The check was reversed so madvise wasn'

Re: madvise() not triggering page discard with MMU-notifiers

2008-08-28 Thread Andrea Arcangeli
On Mon, Aug 18, 2008 at 05:04:25PM -0500, Anthony Liguori wrote: > +if (!kvm_enabled() || !qemu_kvm_has_mmu_notifiers()) > +madvise(addr, TARGET_PAGE_SIZE, > +deflate ? MADV_WILLNEED : MADV_DONTNEED); The check was reversed so madvise wasn't invoked in the first place i

Re: madvise() not triggering page discard with MMU-notifiers

2008-08-20 Thread Anthony Liguori
Marcelo Tosatti wrote: Hi Anthony, On Mon, Aug 18, 2008 at 05:04:25PM -0500, Anthony Liguori wrote: Attached is an updated migration patch. It does not appear, however, that madvise() is triggering discarding of pages even with an MMU-notifier enabled kernel. I take it that this is beca

Re: madvise() not triggering page discard with MMU-notifiers

2008-08-19 Thread Marcelo Tosatti
Hi Anthony, On Mon, Aug 18, 2008 at 05:04:25PM -0500, Anthony Liguori wrote: > Attached is an updated migration patch. It does not appear, however, > that madvise() is triggering discarding of pages even with an > MMU-notifier enabled kernel. I take it that this is because we're still > ho

madvise() not triggering page discard with MMU-notifiers

2008-08-18 Thread Anthony Liguori
Attached is an updated migration patch. It does not appear, however, that madvise() is triggering discarding of pages even with an MMU-notifier enabled kernel. I take it that this is because we're still holding a reference count to the page when it is in the shadow page table? Any ETA on whe