Re: [PATCH] mm: try to free swap only for reading swap fault

2017-11-02 Thread zhouxianrong
i mean for reading swap fault try_to_free_swap in do_swap_page could hurt clean swap cache pages and make them dirty. it affects reclaim procedure in shrink_page_list and let this function write out much more these dirty anonymous pages. in fact these dirty anonymous pages might keep clean

Re: [PATCH] mm: try to free swap only for reading swap fault

2017-11-02 Thread zhouxianrong
i mean for reading swap fault try_to_free_swap in do_swap_page could hurt clean swap cache pages and make them dirty. it affects reclaim procedure in shrink_page_list and let this function write out much more these dirty anonymous pages. in fact these dirty anonymous pages might keep clean

Re: [PATCH] mm: try to free swap only for reading swap fault

2017-11-02 Thread Michal Hocko
On Thu 02-11-17 20:35:19, zhouxianr...@huawei.com wrote: > From: zhouxianrong > > the purpose of this patch is that when a reading swap fault > happens on a clean swap cache page whose swap count is equal > to one, then try_to_free_swap could remove this page from >

Re: [PATCH] mm: try to free swap only for reading swap fault

2017-11-02 Thread Michal Hocko
On Thu 02-11-17 20:35:19, zhouxianr...@huawei.com wrote: > From: zhouxianrong > > the purpose of this patch is that when a reading swap fault > happens on a clean swap cache page whose swap count is equal > to one, then try_to_free_swap could remove this page from > swap cache and mark this

[PATCH] mm: try to free swap only for reading swap fault

2017-11-02 Thread zhouxianrong
From: zhouxianrong the purpose of this patch is that when a reading swap fault happens on a clean swap cache page whose swap count is equal to one, then try_to_free_swap could remove this page from swap cache and mark this page dirty. so if later we reclaimed this page

[PATCH] mm: try to free swap only for reading swap fault

2017-11-02 Thread zhouxianrong
From: zhouxianrong the purpose of this patch is that when a reading swap fault happens on a clean swap cache page whose swap count is equal to one, then try_to_free_swap could remove this page from swap cache and mark this page dirty. so if later we reclaimed this page then we could pageout