Re: [PATCH V2 3/7] mm: reclaim MADV_FREE pages

2017-02-12 Thread Minchan Kim
On Fri, Feb 10, 2017 at 09:43:07AM -0800, Shaohua Li wrote: < snip > > > > diff --git a/mm/vmscan.c b/mm/vmscan.c > > > index 947ab6f..b304a84 100644 > > > --- a/mm/vmscan.c > > > +++ b/mm/vmscan.c > > > @@ -864,7 +864,7 @@ static enum page_references > > > page_check_references(struct page *pag

Re: [PATCH V2 3/7] mm: reclaim MADV_FREE pages

2017-02-10 Thread Shaohua Li
On Fri, Feb 10, 2017 at 03:58:39PM +0900, Minchan Kim wrote: > On Fri, Feb 03, 2017 at 03:33:19PM -0800, Shaohua Li wrote: > > When memory pressure is high, we free MADV_FREE pages. If the pages are > > not dirty in pte, the pages could be freed immediately. Otherwise we > > can't reclaim them. We

Re: [PATCH V2 3/7] mm: reclaim MADV_FREE pages

2017-02-10 Thread Michal Hocko
On Fri 03-02-17 15:33:19, Shaohua Li wrote: > When memory pressure is high, we free MADV_FREE pages. If the pages are > not dirty in pte, the pages could be freed immediately. Otherwise we > can't reclaim them. We put the pages back to anonumous LRU list (by > setting SwapBacked flag) and the pages

Re: [PATCH V2 3/7] mm: reclaim MADV_FREE pages

2017-02-09 Thread Minchan Kim
On Fri, Feb 03, 2017 at 03:33:19PM -0800, Shaohua Li wrote: > When memory pressure is high, we free MADV_FREE pages. If the pages are > not dirty in pte, the pages could be freed immediately. Otherwise we > can't reclaim them. We put the pages back to anonumous LRU list (by > setting SwapBacked fla

[PATCH V2 3/7] mm: reclaim MADV_FREE pages

2017-02-03 Thread Shaohua Li
When memory pressure is high, we free MADV_FREE pages. If the pages are not dirty in pte, the pages could be freed immediately. Otherwise we can't reclaim them. We put the pages back to anonumous LRU list (by setting SwapBacked flag) and the pages will be reclaimed in normal swapout way. We use no