Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-24 Thread Minchan Kim
Hi Shaohua, On Thu, Feb 23, 2017 at 10:15:50PM -0800, Shaohua Li wrote: > On Fri, Feb 24, 2017 at 10:49:39AM +0900, Minchan Kim wrote: > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > > madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous > > > pages, but they

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-24 Thread Minchan Kim
Hi Shaohua, On Thu, Feb 23, 2017 at 10:15:50PM -0800, Shaohua Li wrote: > On Fri, Feb 24, 2017 at 10:49:39AM +0900, Minchan Kim wrote: > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > > madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous > > > pages, but they

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Shaohua Li
On Fri, Feb 24, 2017 at 10:49:39AM +0900, Minchan Kim wrote: > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous > > pages, but they can be freed without pageout. To destinguish them > > against normal anonymous

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Shaohua Li
On Fri, Feb 24, 2017 at 10:49:39AM +0900, Minchan Kim wrote: > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous > > pages, but they can be freed without pageout. To destinguish them > > against normal anonymous

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Minchan Kim
On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous > pages, but they can be freed without pageout. To destinguish them > against normal anonymous pages, we clear their SwapBacked flag. > > MADV_FREE pages could be

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Minchan Kim
On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous > pages, but they can be freed without pageout. To destinguish them > against normal anonymous pages, we clear their SwapBacked flag. > > MADV_FREE pages could be

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Shaohua Li
On Thu, Feb 23, 2017 at 01:22:06PM -0500, Johannes Weiner wrote: > On Thu, Feb 23, 2017 at 08:26:03AM -0800, Shaohua Li wrote: > > On Thu, Feb 23, 2017 at 10:58:27AM -0500, Johannes Weiner wrote: > > > Hi Shaohua, > > > > > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > > > @@

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Shaohua Li
On Thu, Feb 23, 2017 at 01:22:06PM -0500, Johannes Weiner wrote: > On Thu, Feb 23, 2017 at 08:26:03AM -0800, Shaohua Li wrote: > > On Thu, Feb 23, 2017 at 10:58:27AM -0500, Johannes Weiner wrote: > > > Hi Shaohua, > > > > > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > > > @@

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Johannes Weiner
On Thu, Feb 23, 2017 at 08:26:03AM -0800, Shaohua Li wrote: > On Thu, Feb 23, 2017 at 10:58:27AM -0500, Johannes Weiner wrote: > > Hi Shaohua, > > > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > > @@ -268,6 +268,12 @@ static void __activate_page(struct page *page, > > >

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Johannes Weiner
On Thu, Feb 23, 2017 at 08:26:03AM -0800, Shaohua Li wrote: > On Thu, Feb 23, 2017 at 10:58:27AM -0500, Johannes Weiner wrote: > > Hi Shaohua, > > > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > > @@ -268,6 +268,12 @@ static void __activate_page(struct page *page, > > >

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Shaohua Li
On Thu, Feb 23, 2017 at 10:58:27AM -0500, Johannes Weiner wrote: > Hi Shaohua, > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > @@ -268,6 +268,12 @@ static void __activate_page(struct page *page, struct > > lruvec *lruvec, > > int lru = page_lru_base_type(page); >

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Shaohua Li
On Thu, Feb 23, 2017 at 10:58:27AM -0500, Johannes Weiner wrote: > Hi Shaohua, > > On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > > @@ -268,6 +268,12 @@ static void __activate_page(struct page *page, struct > > lruvec *lruvec, > > int lru = page_lru_base_type(page); >

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Johannes Weiner
Hi Shaohua, On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > @@ -268,6 +268,12 @@ static void __activate_page(struct page *page, struct > lruvec *lruvec, > int lru = page_lru_base_type(page); > > del_page_from_lru_list(page, lruvec, lru); > +

Re: [PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-23 Thread Johannes Weiner
Hi Shaohua, On Wed, Feb 22, 2017 at 10:50:41AM -0800, Shaohua Li wrote: > @@ -268,6 +268,12 @@ static void __activate_page(struct page *page, struct > lruvec *lruvec, > int lru = page_lru_base_type(page); > > del_page_from_lru_list(page, lruvec, lru); > +

[PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-22 Thread Shaohua Li
madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous pages, but they can be freed without pageout. To destinguish them against normal anonymous pages, we clear their SwapBacked flag. MADV_FREE pages could be freed without pageout, so they pretty much like used once file pages.

[PATCH V4 3/6] mm: move MADV_FREE pages into LRU_INACTIVE_FILE list

2017-02-22 Thread Shaohua Li
madv MADV_FREE indicate pages are 'lazyfree'. They are still anonymous pages, but they can be freed without pageout. To destinguish them against normal anonymous pages, we clear their SwapBacked flag. MADV_FREE pages could be freed without pageout, so they pretty much like used once file pages.