On 05/09/2012 04:18 PM, Takuya Yoshikawa wrote: > On Wed, 9 May 2012 11:59:17 +0300 > Gleb Natapov <gleb@xxxxxxxxxx> wrote: > > > Hmm, yes if it is file backed it may work. Setting up qemu to use file > > backed memory is one more complication while running the test though. > > I haven't checked by I am not sure that MADV_DONTNEED will drop page > > immediately though. It probably puts it on some list to be freed later. > > Hmm actually looking at the comments it seems like this is what happens: > > > > /* > > * Application no longer needs these pages. If the pages are dirty, > > * it's OK to just throw them away. The app will be more careful about > > * data it wants to keep. Be sure to free swap resources too. The > > * zap_page_range call sets things up for shrink_active_list to actually > > * free > > * these pages later if no one else has touched them in the meantime, > > * although we could add these pages to a global reuse list for > > * shrink_active_list to pick up before reclaiming other pages. > > */ > > zap_page_range() actually frees these pages, no? > > Virtio balloon seems to rely on this. > The pages are removed from the user address space. But if they're not anonymous, the pages still live in the page cache. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html