On Fri, Dec 28, 2012 at 09:24:53AM +0900, Kamezawa Hiroyuki wrote: > (2012/12/26 12:46), Minchan Kim wrote: > >Hi Kame, > > > >What are you doing these holiday season? :) > >I can't believe you sit down in front of computer. > > > Honestly, my holiday starts tomorrow ;) (but until 1/5 in the next year.) > > >> > >>Hm, by the way, the user need to attach pages to the process by causing > >>page-fault > >>(as you do by memset()) before calling mvolatile() ? > > > >For effectiveness, Yes. > > > > Isn't it better to make page-fault by get_user_pages() in mvolatile() ? > Calling page fault in userland seems just to increase burden of apps.
It seems you misunderstood. Firstly, this patch's goal is to minimize minor fault + page allocation + memset_zero if possible on anon pages. If someone(like allocator) calls madvise(DONTNEED)/munmap on range which has garbage collected memory, VM zaps all the pte so if user try to reuse that range, we can't avoid above overheads. The mvolatile avoids them with not zapping ptes when memory pressure isn't severe while VM can discard pages without swapping out if memory pressure happens. So, GUP in mvolatile isn't necessary. > > >> > >>I think your approach is interesting, anyway. > > > >Thanks for your interest, Kame. > > > >あけましておめでとう. > > > > A happy new year. > > Thanks, > -Kame > > > -- > To unsubscribe, send a message with 'unsubscribe linux-mm' in > the body to majord...@kvack.org. For more info on Linux MM, > see: http://www.linux-mm.org/ . > Don't email: <a href=mailto:"d...@kvack.org"> em...@kvack.org </a> -- Kind regards, Minchan Kim -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/