Re: [RFC 3/7] mm: introduce MADV_COLD

2019-05-29 Thread Minchan Kim
On Tue, May 28, 2019 at 10:54:32PM +0800, Hillf Danton wrote: > > On Mon, 20 May 2019 12:52:50 +0900 Minchan Kim wrote: > > +unsigned long reclaim_pages(struct list_head *page_list) > > +{ > > + int nid = -1; > > + unsigned long nr_isolated[2] = {0, }; > > + unsigned long nr_reclaimed = 0; >

Re: [RFC 3/7] mm: introduce MADV_COLD

2019-05-21 Thread Minchan Kim
On Tue, May 21, 2019 at 08:08:20AM +0200, Michal Hocko wrote: > On Tue 21-05-19 08:00:38, Minchan Kim wrote: > > On Mon, May 20, 2019 at 10:27:03AM +0200, Michal Hocko wrote: > > > [Cc linux-api] > > > > > > On Mon 20-05-19 12:52:50, Minchan Kim wrote: > > > > When a process expects no accesses to

Re: [RFC 3/7] mm: introduce MADV_COLD

2019-05-20 Thread Michal Hocko
On Tue 21-05-19 08:00:38, Minchan Kim wrote: > On Mon, May 20, 2019 at 10:27:03AM +0200, Michal Hocko wrote: > > [Cc linux-api] > > > > On Mon 20-05-19 12:52:50, Minchan Kim wrote: > > > When a process expects no accesses to a certain memory range > > > for a long time, it could hint kernel that t

Re: [RFC 3/7] mm: introduce MADV_COLD

2019-05-20 Thread Minchan Kim
On Mon, May 20, 2019 at 10:27:03AM +0200, Michal Hocko wrote: > [Cc linux-api] > > On Mon 20-05-19 12:52:50, Minchan Kim wrote: > > When a process expects no accesses to a certain memory range > > for a long time, it could hint kernel that the pages can be > > reclaimed instantly but data should b

Re: [RFC 3/7] mm: introduce MADV_COLD

2019-05-20 Thread Michal Hocko
[Cc linux-api] On Mon 20-05-19 12:52:50, Minchan Kim wrote: > When a process expects no accesses to a certain memory range > for a long time, it could hint kernel that the pages can be > reclaimed instantly but data should be preserved for future use. > This could reduce workingset eviction so it

[RFC 3/7] mm: introduce MADV_COLD

2019-05-19 Thread Minchan Kim
When a process expects no accesses to a certain memory range for a long time, it could hint kernel that the pages can be reclaimed instantly but data should be preserved for future use. This could reduce workingset eviction so it ends up increasing performance. This patch introduces the new MADV_C