Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-07 Thread Jan Kara
On Wed 05-12-18 09:58:10, Josef Bacik wrote: > On Tue, Dec 04, 2018 at 02:50:34PM -0800, Andrew Morton wrote: > > On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > > > > > If we drop the mmap_sem we have to redo the vma lookup which requires > > > redoing the fault handler. Chances are we

Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-07 Thread Jan Kara
On Wed 05-12-18 09:58:10, Josef Bacik wrote: > On Tue, Dec 04, 2018 at 02:50:34PM -0800, Andrew Morton wrote: > > On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > > > > > If we drop the mmap_sem we have to redo the vma lookup which requires > > > redoing the fault handler. Chances are we

Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-05 Thread Josef Bacik
On Tue, Dec 04, 2018 at 02:50:34PM -0800, Andrew Morton wrote: > On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > > > If we drop the mmap_sem we have to redo the vma lookup which requires > > redoing the fault handler. Chances are we will just come back to the > > same page, so save this

Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-05 Thread Josef Bacik
On Tue, Dec 04, 2018 at 02:50:34PM -0800, Andrew Morton wrote: > On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > > > If we drop the mmap_sem we have to redo the vma lookup which requires > > redoing the fault handler. Chances are we will just come back to the > > same page, so save this

Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-04 Thread Andrew Morton
On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > If we drop the mmap_sem we have to redo the vma lookup which requires > redoing the fault handler. Chances are we will just come back to the > same page, so save this page in our vmf->cached_page and reuse it in the > next loop through the

Re: [PATCH 4/4] mm: use the cached page for filemap_fault

2018-12-04 Thread Andrew Morton
On Fri, 30 Nov 2018 14:58:12 -0500 Josef Bacik wrote: > If we drop the mmap_sem we have to redo the vma lookup which requires > redoing the fault handler. Chances are we will just come back to the > same page, so save this page in our vmf->cached_page and reuse it in the > next loop through the

[PATCH 4/4] mm: use the cached page for filemap_fault

2018-11-30 Thread Josef Bacik
If we drop the mmap_sem we have to redo the vma lookup which requires redoing the fault handler. Chances are we will just come back to the same page, so save this page in our vmf->cached_page and reuse it in the next loop through the fault handler. Signed-off-by: Josef Bacik --- mm/filemap.c |

[PATCH 4/4] mm: use the cached page for filemap_fault

2018-11-30 Thread Josef Bacik
If we drop the mmap_sem we have to redo the vma lookup which requires redoing the fault handler. Chances are we will just come back to the same page, so save this page in our vmf->cached_page and reuse it in the next loop through the fault handler. Signed-off-by: Josef Bacik --- mm/filemap.c |