Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Minchan Kim
On Wed, Nov 04, 2015 at 10:20:47AM -0800, Shaohua Li wrote: > On Wed, Nov 04, 2015 at 09:53:42AM -0800, Shaohua Li wrote: > > On Tue, Nov 03, 2015 at 09:52:23AM +0900, Minchan Kim wrote: > > > On Fri, Oct 30, 2015 at 10:22:12AM -0700, Shaohua Li wrote: > > > > On Fri, Oct 30, 2015 at 04:01:41PM +09

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Minchan Kim
On Wed, Nov 04, 2015 at 09:53:42AM -0800, Shaohua Li wrote: > On Tue, Nov 03, 2015 at 09:52:23AM +0900, Minchan Kim wrote: > > On Fri, Oct 30, 2015 at 10:22:12AM -0700, Shaohua Li wrote: > > > On Fri, Oct 30, 2015 at 04:01:41PM +0900, Minchan Kim wrote: > > > > MADV_FREE is a hint that it's okay to

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Daniel Micay
> From a user perspective, it doesn't depend on swap. It's just slower > without swap because it does what MADV_DONTNEED does. The current > implementation can be dropped in where MADV_DONTNEED was previously used. It just wouldn't replace existing layers of purging logic until that edge case is f

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Daniel Micay
>>> It probably makes sense to stop thinking about them as anonymous pages >>> entirely at this point when it comes to aging. They're really not. The >>> LRU lists are split to differentiate access patterns and cost of page >>> stealing (and restoring). From that angle, MADV_FREE pages really have

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Johannes Weiner
On Wed, Nov 04, 2015 at 04:48:17PM -0500, Daniel Micay wrote: > > Even if we're wrong about the aging of those MADV_FREE pages, their > > contents are invalidated; they can be discarded freely, and restoring > > them is a mere GFP_ZERO allocation. All other anonymous pages have to > > be written to

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Daniel Micay
> Even if we're wrong about the aging of those MADV_FREE pages, their > contents are invalidated; they can be discarded freely, and restoring > them is a mere GFP_ZERO allocation. All other anonymous pages have to > be written to disk, and potentially be read back. > > [ Arguably, MADV_FREE pages

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Johannes Weiner
On Fri, Oct 30, 2015 at 04:01:41PM +0900, Minchan Kim wrote: > MADV_FREE is a hint that it's okay to discard pages if there is memory > pressure and we use reclaimers(ie, kswapd and direct reclaim) to free them > so there is no value keeping them in the active anonymous LRU so this > patch moves th

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Shaohua Li
On Wed, Nov 04, 2015 at 09:53:42AM -0800, Shaohua Li wrote: > On Tue, Nov 03, 2015 at 09:52:23AM +0900, Minchan Kim wrote: > > On Fri, Oct 30, 2015 at 10:22:12AM -0700, Shaohua Li wrote: > > > On Fri, Oct 30, 2015 at 04:01:41PM +0900, Minchan Kim wrote: > > > > MADV_FREE is a hint that it's okay to

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Shaohua Li
On Tue, Nov 03, 2015 at 09:52:23AM +0900, Minchan Kim wrote: > On Fri, Oct 30, 2015 at 10:22:12AM -0700, Shaohua Li wrote: > > On Fri, Oct 30, 2015 at 04:01:41PM +0900, Minchan Kim wrote: > > > MADV_FREE is a hint that it's okay to discard pages if there is memory > > > pressure and we use reclaime

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-04 Thread Michal Hocko
On Tue 03-11-15 09:52:23, Minchan Kim wrote: [...] > I believe adding new LRU list would be controversial(ie, not trivial) > for maintainer POV even though code wouldn't be complicated. > So, I want to see problems in *real practice*, not any theoritical > test program before diving into that. > To

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-11-02 Thread Minchan Kim
On Fri, Oct 30, 2015 at 10:22:12AM -0700, Shaohua Li wrote: > On Fri, Oct 30, 2015 at 04:01:41PM +0900, Minchan Kim wrote: > > MADV_FREE is a hint that it's okay to discard pages if there is memory > > pressure and we use reclaimers(ie, kswapd and direct reclaim) to free them > > so there is no val

Re: [PATCH 5/8] mm: move lazily freed pages to inactive list

2015-10-30 Thread Shaohua Li
On Fri, Oct 30, 2015 at 04:01:41PM +0900, Minchan Kim wrote: > MADV_FREE is a hint that it's okay to discard pages if there is memory > pressure and we use reclaimers(ie, kswapd and direct reclaim) to free them > so there is no value keeping them in the active anonymous LRU so this > patch moves th