Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread Andrew Morton
On Thu, 04 Jan 2018 16:17:50 +0800 "夷则(Caspar)" wrote: > > So, thinking caps on: why not just discard them? After all, that's > > what userspace asked us to do. > > Hi Andrew, I doubt if "just discard them" is a proper action to match > the userspace's expectation.

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread Andrew Morton
On Thu, 04 Jan 2018 16:17:50 +0800 "夷则(Caspar)" wrote: > > So, thinking caps on: why not just discard them? After all, that's > > what userspace asked us to do. > > Hi Andrew, I doubt if "just discard them" is a proper action to match > the userspace's expectation. Maybe we will never meet

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread 夷则(Caspar)
On 2018/1/4 19:34, Mel Gorman wrote: On Thu, Jan 04, 2018 at 02:13:43PM +0800, ??(Caspar) wrote: On 2018/1/3 18:48, Mel Gorman wrote: On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: ?? 2017??12??2312:16?? ?? From:

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread 夷则(Caspar)
On 2018/1/4 19:34, Mel Gorman wrote: On Thu, Jan 04, 2018 at 02:13:43PM +0800, ??(Caspar) wrote: On 2018/1/3 18:48, Mel Gorman wrote: On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: ?? 2017??12??2312:16?? ?? From: "shidao.ytt" in commit 441c228f817f7

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread Mel Gorman
On Thu, Jan 04, 2018 at 02:13:43PM +0800, ??(Caspar) wrote: > > > On 2018/1/3 18:48, Mel Gorman wrote: > > On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: > > > > > > > > > > ?? 2017??12??2312:16?? ?? > > > > > > > > From:

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread Mel Gorman
On Thu, Jan 04, 2018 at 02:13:43PM +0800, ??(Caspar) wrote: > > > On 2018/1/3 18:48, Mel Gorman wrote: > > On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: > > > > > > > > > > ?? 2017??12??2312:16?? ?? > > > > > > > > From: "shidao.ytt" > > > > > > > > in

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread Mel Gorman
On Wed, Jan 03, 2018 at 04:17:53PM -0800, Andrew Morton wrote: > : invalidate_mapping_pages() takes start/end, but fadvise is currently passing > : it start/len. > : > : > : > : mm/fadvise.c |8 ++-- > : 1 files changed, 6 insertions(+), 2 deletions(-) > : > : diff -puN

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread Mel Gorman
On Wed, Jan 03, 2018 at 04:17:53PM -0800, Andrew Morton wrote: > : invalidate_mapping_pages() takes start/end, but fadvise is currently passing > : it start/len. > : > : > : > : mm/fadvise.c |8 ++-- > : 1 files changed, 6 insertions(+), 2 deletions(-) > : > : diff -puN

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread 夷则(Caspar)
On 2018/1/4 08:17, Andrew Morton wrote: On Wed, 3 Jan 2018 10:48:00 + Mel Gorman wrote: On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: ?? 2017??12??2312:16?? ?? From: "shidao.ytt"

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-04 Thread 夷则(Caspar)
On 2018/1/4 08:17, Andrew Morton wrote: On Wed, 3 Jan 2018 10:48:00 + Mel Gorman wrote: On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: ?? 2017??12??2312:16?? ?? From: "shidao.ytt" in commit 441c228f817f7 ("mm: fadvise: document the

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread 夷则(Caspar)
On 2018/1/4 14:13, 夷则(Caspar) wrote: This patch is trying to help to solve a real issue. Sometimes we need to evict the whole file from page cache because we are sure it will not be used in the near future. We try to use posix_fadvise() to finish our work but we often see a "small tail" at

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread 夷则(Caspar)
On 2018/1/4 14:13, 夷则(Caspar) wrote: This patch is trying to help to solve a real issue. Sometimes we need to evict the whole file from page cache because we are sure it will not be used in the near future. We try to use posix_fadvise() to finish our work but we often see a "small tail" at

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread 夷则(Caspar)
On 2018/1/3 18:48, Mel Gorman wrote: On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: ?? 2017??12??2312:16?? ?? From: "shidao.ytt" in commit 441c228f817f7 ("mm: fadvise: document the

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread 夷则(Caspar)
On 2018/1/3 18:48, Mel Gorman wrote: On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: ?? 2017??12??2312:16?? ?? From: "shidao.ytt" in commit 441c228f817f7 ("mm: fadvise: document the fadvise(FADV_DONTNEED) behaviour for partial pages") Mel Gorman explained

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread Andrew Morton
On Wed, 3 Jan 2018 10:48:00 + Mel Gorman wrote: > On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: > > > > > > > ?? 2017??12??2312:16?? ?? > > > > > > From: "shidao.ytt" > >

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread Andrew Morton
On Wed, 3 Jan 2018 10:48:00 + Mel Gorman wrote: > On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: > > > > > > > ?? 2017??12??2312:16?? ?? > > > > > > From: "shidao.ytt" > > > > > > in commit 441c228f817f7 ("mm: fadvise: document the > > >

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread Mel Gorman
On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: > > > > ?? 2017??12??2312:16?? ?? > > > > From: "shidao.ytt" > > > > in commit 441c228f817f7 ("mm: fadvise: document the > > fadvise(FADV_DONTNEED) behaviour

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-03 Thread Mel Gorman
On Wed, Jan 03, 2018 at 02:53:43PM +0800, ??(Caspar) wrote: > > > > ?? 2017??12??2312:16?? ?? > > > > From: "shidao.ytt" > > > > in commit 441c228f817f7 ("mm: fadvise: document the > > fadvise(FADV_DONTNEED) behaviour for partial pages") Mel Gorman > > explained why partial

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-02 Thread 夷则(Caspar)
> 在 2017年12月23日,12:16,十刀 写道: > > From: "shidao.ytt" > > in commit 441c228f817f7 ("mm: fadvise: document the > fadvise(FADV_DONTNEED) behaviour for partial pages") Mel Gorman > explained why partial pages should be preserved instead of

Re: [PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2018-01-02 Thread 夷则(Caspar)
> 在 2017年12月23日,12:16,十刀 写道: > > From: "shidao.ytt" > > in commit 441c228f817f7 ("mm: fadvise: document the > fadvise(FADV_DONTNEED) behaviour for partial pages") Mel Gorman > explained why partial pages should be preserved instead of discarded > when using fadvise(FADV_DONTNEED), however

[PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2017-12-22 Thread 十刀
From: "shidao.ytt" in commit 441c228f817f7 ("mm: fadvise: document the fadvise(FADV_DONTNEED) behaviour for partial pages") Mel Gorman explained why partial pages should be preserved instead of discarded when using fadvise(FADV_DONTNEED), however the actual codes to

[PATCH] mm/fadvise: discard partial pages iff endbyte is also eof

2017-12-22 Thread 十刀
From: "shidao.ytt" in commit 441c228f817f7 ("mm: fadvise: document the fadvise(FADV_DONTNEED) behaviour for partial pages") Mel Gorman explained why partial pages should be preserved instead of discarded when using fadvise(FADV_DONTNEED), however the actual codes to calcuate end_index was