[PATCH v2] vhost: remove unused lock check flag in vhost_dev_cleanup()

2018-01-05 Thread (Caspar)
From: Caspar Zhang In commit ea5d404655ba ("vhost: fix release path lockdep checks"), Michael added a flag to check whether we should hold a lock in vhost_dev_cleanup(), however, in commit 47283bef7ed3 ("vhost: move memory pointer to VQs"), RCU operations have been

[PATCH v2] vhost: remove unused lock check flag in vhost_dev_cleanup()

2018-01-05 Thread (Caspar)
From: Caspar Zhang In commit ea5d404655ba ("vhost: fix release path lockdep checks"), Michael added a flag to check whether we should hold a lock in vhost_dev_cleanup(), however, in commit 47283bef7ed3 ("vhost: move memory pointer to VQs"), RCU operations have been replaced by mutex, we can

[PATCH v2] mm/fadvise: discard partial page if endbyte is also EOF

2018-01-04 Thread (Caspar)
From: shidao.ytt During our recent testing with fadvise(FADV_DONTNEED), we find that if given offset/length is not page-aligned, the last page will not be discarded. The tool we use is vmtouch (https://hoytech.com/vmtouch/), we map a 10KB-sized file into memory and

[PATCH v2] mm/fadvise: discard partial page if endbyte is also EOF

2018-01-04 Thread (Caspar)
From: shidao.ytt During our recent testing with fadvise(FADV_DONTNEED), we find that if given offset/length is not page-aligned, the last page will not be discarded. The tool we use is vmtouch (https://hoytech.com/vmtouch/), we map a 10KB-sized file into memory and then try to run this tool to

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 (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

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

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-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] vhost: remove unused lock check flag in vhost_dev_cleanup()

2017-12-24 Thread (Caspar)
In commit ea5d404655ba ("vhost: fix release path lockdep checks"), Michael added a flag to check whether we should hold a lock in vhost_dev_cleanup(), however, in commit 47283bef7ed3 ("vhost: move memory pointer to VQs"), RCU operations have been replaced by mutex, we can remove the no-longer-used

[PATCH] vhost: remove unused lock check flag in vhost_dev_cleanup()

2017-12-24 Thread (Caspar)
In commit ea5d404655ba ("vhost: fix release path lockdep checks"), Michael added a flag to check whether we should hold a lock in vhost_dev_cleanup(), however, in commit 47283bef7ed3 ("vhost: move memory pointer to VQs"), RCU operations have been replaced by mutex, we can remove the no-longer-used