Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-27 Thread Johannes Weiner
On Thu, Aug 27, 2020 at 01:59:41PM +0100, Matthew Wilcox wrote: > On Wed, Aug 26, 2020 at 10:20:02AM -0400, Johannes Weiner wrote: > > The refactor makes sense to me, but the name is confusing. We're not > > looking for a swap page, we're primarily looking for a file page in > > the page cache mapp

Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-27 Thread Matthew Wilcox
On Wed, Aug 26, 2020 at 10:20:02AM -0400, Johannes Weiner wrote: > The refactor makes sense to me, but the name is confusing. We're not > looking for a swap page, we're primarily looking for a file page in > the page cache mapping that's handed in. Only in the special case > where it's a shmem mapp

Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-26 Thread Johannes Weiner
On Wed, Aug 26, 2020 at 03:54:14PM +0100, Matthew Wilcox wrote: > On Wed, Aug 26, 2020 at 10:20:02AM -0400, Johannes Weiner wrote: > > On Wed, Aug 19, 2020 at 07:48:44PM +0100, Matthew Wilcox (Oracle) wrote: > > > + return find_get_swap_page(vma->vm_file->f_mapping, > > > + linear_p

Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-26 Thread Matthew Wilcox
On Wed, Aug 26, 2020 at 10:20:02AM -0400, Johannes Weiner wrote: > On Wed, Aug 19, 2020 at 07:48:44PM +0100, Matthew Wilcox (Oracle) wrote: > > + return find_get_swap_page(vma->vm_file->f_mapping, > > + linear_page_index(vma, addr)); > > The refactor makes sense to me, but the

Re: [Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-26 Thread Johannes Weiner
On Wed, Aug 19, 2020 at 07:48:44PM +0100, Matthew Wilcox (Oracle) wrote: > The current code does not protect against swapoff of the underlying > swap device, so this is a bug fix as well as a worthwhile reduction in > code complexity. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > mm/memcont

[Intel-gfx] [PATCH 2/8] mm: Use find_get_swap_page in memcontrol

2020-08-19 Thread Matthew Wilcox (Oracle)
The current code does not protect against swapoff of the underlying swap device, so this is a bug fix as well as a worthwhile reduction in code complexity. Signed-off-by: Matthew Wilcox (Oracle) --- mm/memcontrol.c | 25 ++--- 1 file changed, 2 insertions(+), 23 deletions(-)