Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-11 Thread Jan Kara
On Tue 11-12-18 11:08:53, Josef Bacik wrote: > On Tue, Dec 11, 2018 at 10:40:34AM +0100, Jan Kara wrote: > > > The lock_page_or_retry() case in particular gets hit a lot with > > > multi-threaded applications that got paged out because of heavy memory > > > pressure. By no means is it as high as j

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-11 Thread Josef Bacik
On Tue, Dec 11, 2018 at 10:40:34AM +0100, Jan Kara wrote: > On Mon 10-12-18 13:44:39, Josef Bacik wrote: > > On Fri, Dec 07, 2018 at 12:01:38PM +0100, Jan Kara wrote: > > > On Fri 30-11-18 14:58:11, Josef Bacik wrote: > > > > @@ -2433,9 +2458,32 @@ vm_fault_t filemap_fault(struct vm_fault *vmf) > >

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-11 Thread Jan Kara
On Mon 10-12-18 13:44:39, Josef Bacik wrote: > On Fri, Dec 07, 2018 at 12:01:38PM +0100, Jan Kara wrote: > > On Fri 30-11-18 14:58:11, Josef Bacik wrote: > > > @@ -2433,9 +2458,32 @@ vm_fault_t filemap_fault(struct vm_fault *vmf) > > > return vmf_error(-ENOMEM); > > > } > > >

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-10 Thread Josef Bacik
On Fri, Dec 07, 2018 at 12:01:38PM +0100, Jan Kara wrote: > On Fri 30-11-18 14:58:11, Josef Bacik wrote: > > Currently we only drop the mmap_sem if there is contention on the page > > lock. The idea is that we issue readahead and then go to lock the page > > while it is under IO and we want to not

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-07 Thread Jan Kara
On Fri 30-11-18 14:58:11, Josef Bacik wrote: > Currently we only drop the mmap_sem if there is contention on the page > lock. The idea is that we issue readahead and then go to lock the page > while it is under IO and we want to not hold the mmap_sem during the IO. > > The problem with this is th

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-05 Thread Johannes Weiner
On Fri, Nov 30, 2018 at 02:58:11PM -0500, Josef Bacik wrote: > Currently we only drop the mmap_sem if there is contention on the page > lock. The idea is that we issue readahead and then go to lock the page > while it is under IO and we want to not hold the mmap_sem during the IO. > > The problem

Re: [PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-12-04 Thread Andrew Morton
On Fri, 30 Nov 2018 14:58:11 -0500 Josef Bacik wrote: > Currently we only drop the mmap_sem if there is contention on the page > lock. The idea is that we issue readahead and then go to lock the page > while it is under IO and we want to not hold the mmap_sem during the IO. > > The problem with

[PATCH 3/4] filemap: drop the mmap_sem for all blocking operations

2018-11-30 Thread Josef Bacik
Currently we only drop the mmap_sem if there is contention on the page lock. The idea is that we issue readahead and then go to lock the page while it is under IO and we want to not hold the mmap_sem during the IO. The problem with this is the assumption that the readahead does anything. In the