Re: [PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-20 Thread Joel Fernandes
On Thu, Jun 20, 2019 at 1:01 AM Minchan Kim wrote: [snip] > > > > > > > > I think to fix this, what you should do is clear the PG_Idle flag if the > > > > young/accessed PTE bits are set. If PG_Idle is already cleared, then you > > > > don't need to do anything. > > > > > > I'm not sure. What

Re: [PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-19 Thread Minchan Kim
On Wed, Jun 19, 2019 at 01:13:40PM -0400, Joel Fernandes wrote: < snip > Ccing Vladimir > > > > > > +static int madvise_cold_pte_range(pmd_t *pmd, unsigned long addr, > > > > > > + unsigned long end, struct mm_walk *walk) > > > > > > +{ > > > > > > + pte_t *orig_pte,

Re: [PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-19 Thread Joel Fernandes
Sorry Minchan for late reply, I had a visa interview travel and then the weekend came. I replied below: On Thu, Jun 13, 2019 at 01:48:24PM +0900, Minchan Kim wrote: > On Wed, Jun 12, 2019 at 01:21:04PM -0400, Joel Fernandes wrote: > > On Mon, Jun 10, 2019 at 07:09:04PM +0900, Minchan Kim wrote: >

Re: [PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-13 Thread Minchan Kim
On Wed, Jun 12, 2019 at 01:21:04PM -0400, Joel Fernandes wrote: > On Mon, Jun 10, 2019 at 07:09:04PM +0900, Minchan Kim wrote: > > Hi Joel, > > > > On Tue, Jun 04, 2019 at 04:38:41PM -0400, Joel Fernandes wrote: > > > On Mon, Jun 03, 2019 at 02:36:52PM +0900, Minchan Kim wrote: > > > > When a

Re: [PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-12 Thread Joel Fernandes
On Mon, Jun 10, 2019 at 07:09:04PM +0900, Minchan Kim wrote: > Hi Joel, > > On Tue, Jun 04, 2019 at 04:38:41PM -0400, Joel Fernandes wrote: > > On Mon, Jun 03, 2019 at 02:36:52PM +0900, Minchan Kim wrote: > > > When a process expects no accesses to a certain memory range, it could > > > give a

Re: [PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-10 Thread Minchan Kim
Hi Joel, On Tue, Jun 04, 2019 at 04:38:41PM -0400, Joel Fernandes wrote: > On Mon, Jun 03, 2019 at 02:36:52PM +0900, Minchan Kim wrote: > > When a process expects no accesses to a certain memory range, it could > > give a hint to kernel that the pages can be reclaimed when memory pressure > >

Re: [PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-04 Thread Joel Fernandes
On Mon, Jun 03, 2019 at 02:36:52PM +0900, Minchan Kim wrote: > When a process expects no accesses to a certain memory range, it could > give a hint to kernel that the pages can be reclaimed when memory pressure > happens but data should be preserved for future use. This could reduce > workingset

[PATCH v1 1/4] mm: introduce MADV_COLD

2019-06-02 Thread Minchan Kim
When a process expects no accesses to a certain memory range, it could give a hint to kernel that the pages can be reclaimed when memory pressure happens but data should be preserved for future use. This could reduce workingset eviction so it ends up increasing performance. This patch introduces