[RFC v2 0/3] support madvise(MADV_FREE)

2014-03-20 Thread Minchan Kim
This patch is an attempt to support MADV_FREE for Linux. Rationale is following as. Allocators call munmap(2) when user call free(3) if ptr is in mmaped area. But munmap isn't cheap because it have to clean up all pte entries, unlinking a vma and returns free pages to page allocator so that

[RFC v2 0/3] support madvise(MADV_FREE)

2014-03-20 Thread Minchan Kim
This patch is an attempt to support MADV_FREE for Linux. Rationale is following as. Allocators call munmap(2) when user call free(3) if ptr is in mmaped area. But munmap isn't cheap because it have to clean up all pte entries, unlinking a vma and returns free pages to page allocator so that