Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-07 Thread Kirill A. Shutemov
On Thu, Mar 02, 2017 at 03:39:17PM +0900, Minchan Kim wrote: > If we found lazyfree page is dirty, ttuo can just SetPageSwapBakced > in there like PG_mlocked page and just return with SWAP_FAIL which > is very natural because the page is not swappable right now so that > vmscan can activate it.

Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-07 Thread Kirill A. Shutemov
On Thu, Mar 02, 2017 at 03:39:17PM +0900, Minchan Kim wrote: > If we found lazyfree page is dirty, ttuo can just SetPageSwapBakced > in there like PG_mlocked page and just return with SWAP_FAIL which > is very natural because the page is not swappable right now so that > vmscan can activate it.

Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-02 Thread Minchan Kim
Hi Hillf, On Thu, Mar 02, 2017 at 03:34:45PM +0800, Hillf Danton wrote: > > On March 02, 2017 2:39 PM Minchan Kim wrote: > > @@ -1424,7 +1424,8 @@ static int try_to_unmap_one(struct page *page, struct > > vm_area_struct *vma, > > } else if (!PageSwapBacked(page)) { > >

Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-02 Thread Minchan Kim
Hi Hillf, On Thu, Mar 02, 2017 at 03:34:45PM +0800, Hillf Danton wrote: > > On March 02, 2017 2:39 PM Minchan Kim wrote: > > @@ -1424,7 +1424,8 @@ static int try_to_unmap_one(struct page *page, struct > > vm_area_struct *vma, > > } else if (!PageSwapBacked(page)) { > >

Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-02 Thread Anshuman Khandual
On 03/02/2017 12:09 PM, Minchan Kim wrote: > If we found lazyfree page is dirty, ttuo can just SetPageSwapBakced > in there like PG_mlocked page and just return with SWAP_FAIL which > is very natural because the page is not swappable right now so that > vmscan can activate it. There is no point to

Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-02 Thread Anshuman Khandual
On 03/02/2017 12:09 PM, Minchan Kim wrote: > If we found lazyfree page is dirty, ttuo can just SetPageSwapBakced > in there like PG_mlocked page and just return with SWAP_FAIL which > is very natural because the page is not swappable right now so that > vmscan can activate it. There is no point to

Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-01 Thread Hillf Danton
On March 02, 2017 2:39 PM Minchan Kim wrote: > @@ -1424,7 +1424,8 @@ static int try_to_unmap_one(struct page *page, struct > vm_area_struct *vma, > } else if (!PageSwapBacked(page)) { > /* dirty MADV_FREE page */ Nit: enrich the comment

Re: [RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-01 Thread Hillf Danton
On March 02, 2017 2:39 PM Minchan Kim wrote: > @@ -1424,7 +1424,8 @@ static int try_to_unmap_one(struct page *page, struct > vm_area_struct *vma, > } else if (!PageSwapBacked(page)) { > /* dirty MADV_FREE page */ Nit: enrich the comment

[RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-01 Thread Minchan Kim
If we found lazyfree page is dirty, ttuo can just SetPageSwapBakced in there like PG_mlocked page and just return with SWAP_FAIL which is very natural because the page is not swappable right now so that vmscan can activate it. There is no point to introduce new return value SWAP_DIRTY in ttu at

[RFC 03/11] mm: remove SWAP_DIRTY in ttu

2017-03-01 Thread Minchan Kim
If we found lazyfree page is dirty, ttuo can just SetPageSwapBakced in there like PG_mlocked page and just return with SWAP_FAIL which is very natural because the page is not swappable right now so that vmscan can activate it. There is no point to introduce new return value SWAP_DIRTY in ttu at