Re: [PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-20 Thread Michal Hocko
On Thu 20-06-19 19:32:15, Minchan Kim wrote: [...] > Then, okay, I will add can_do_mincore similar check for the MADV_PAGEOUT > syscall > if others have different ideas. Great that we are on the same page. We can simply skip over those pages. -- Michal Hocko SUSE Labs

Re: [PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-20 Thread Minchan Kim
On Thu, Jun 20, 2019 at 11:22:09AM +0200, Michal Hocko wrote: > On Thu 20-06-19 17:40:40, Minchan Kim wrote: > > > > > Pushing out a shared page cache > > > > > is possible even now but this interface gives a much easier tool to > > > > > evict shared state and perform all sorts of timing attacks.

Re: [PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-20 Thread Michal Hocko
On Thu 20-06-19 17:40:40, Minchan Kim wrote: > > > > Pushing out a shared page cache > > > > is possible even now but this interface gives a much easier tool to > > > > evict shared state and perform all sorts of timing attacks. Unless I am > > > > missing something we should be doing something

Re: [PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-20 Thread Minchan Kim
On Thu, Jun 20, 2019 at 09:04:44AM +0200, Michal Hocko wrote: > On Thu 20-06-19 13:16:20, Minchan Kim wrote: > > On Wed, Jun 19, 2019 at 03:24:50PM +0200, Michal Hocko wrote: > > > On Mon 10-06-19 20:12:51, Minchan Kim wrote: > > > [...] > > > > +static int madvise_pageout_pte_range(pmd_t *pmd,

Re: [PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-20 Thread Michal Hocko
On Thu 20-06-19 13:16:20, Minchan Kim wrote: > On Wed, Jun 19, 2019 at 03:24:50PM +0200, Michal Hocko wrote: > > On Mon 10-06-19 20:12:51, Minchan Kim wrote: > > [...] > > > +static int madvise_pageout_pte_range(pmd_t *pmd, unsigned long addr, > > > + unsigned long end,

Re: [PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-19 Thread Minchan Kim
On Wed, Jun 19, 2019 at 03:24:50PM +0200, Michal Hocko wrote: > On Mon 10-06-19 20:12:51, Minchan Kim wrote: > [...] > > +static int madvise_pageout_pte_range(pmd_t *pmd, unsigned long addr, > > + unsigned long end, struct mm_walk *walk) > > Again the same question about

Re: [PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-19 Thread Michal Hocko
On Mon 10-06-19 20:12:51, Minchan Kim wrote: [...] > +static int madvise_pageout_pte_range(pmd_t *pmd, unsigned long addr, > + unsigned long end, struct mm_walk *walk) Again the same question about a potential code reuse... [...] > +regular_page: > +

[PATCH v2 4/5] mm: introduce MADV_PAGEOUT

2019-06-10 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