RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-09-26 Thread Andrea Arcangeli
On Thu, Sep 25, 2014 at 02:50:29PM -0700, Andres Lagar-Cavilla wrote: > It's nearly impossible to name it right because 1) it indicates we can > relinquish 2) it returns whether we still hold the mmap semaphore. > > I'd prefer it'd be called mmap_sem_hold, which conveys immediately > what this is

Re: RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-09-26 Thread Andres Lagar-Cavilla
On Fri, Sep 26, 2014 at 10:25 AM, Andrea Arcangeli wrote: > On Thu, Sep 25, 2014 at 02:50:29PM -0700, Andres Lagar-Cavilla wrote: >> It's nearly impossible to name it right because 1) it indicates we can >> relinquish 2) it returns whether we still hold the mmap semaphore. >> >> I'd prefer it'd be

Re: RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-09-28 Thread Andrea Arcangeli
On Fri, Sep 26, 2014 at 12:54:46PM -0700, Andres Lagar-Cavilla wrote: > On Fri, Sep 26, 2014 at 10:25 AM, Andrea Arcangeli > wrote: > > On Thu, Sep 25, 2014 at 02:50:29PM -0700, Andres Lagar-Cavilla wrote: > >> It's nearly impossible to name it right because 1) it indicates we can > >> relinquish

Re: RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-10-01 Thread Peter Zijlstra
On Fri, Sep 26, 2014 at 07:25:35PM +0200, Andrea Arcangeli wrote: > diff --git a/drivers/dma/iovlock.c b/drivers/dma/iovlock.c > index bb48a57..12ea7c3 100644 > --- a/drivers/dma/iovlock.c > +++ b/drivers/dma/iovlock.c > @@ -95,17 +95,11 @@ struct dma_pinned_list *dma_pin_iovec_pages(struct iovec

Re: RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-10-02 Thread Andrea Arcangeli
On Wed, Oct 01, 2014 at 05:36:11PM +0200, Peter Zijlstra wrote: > For all these and the other _fast() users, is there an actual limit to > the nr_pages passed in? Because we used to have the 64 pages limit from > DIO, but without that we get rather long IRQ-off latencies. Ok, I would tend to think

Re: RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-10-02 Thread Peter Zijlstra
On Thu, Oct 02, 2014 at 02:31:17PM +0200, Andrea Arcangeli wrote: > On Wed, Oct 01, 2014 at 05:36:11PM +0200, Peter Zijlstra wrote: > > For all these and the other _fast() users, is there an actual limit to > > the nr_pages passed in? Because we used to have the 64 pages limit from > > DIO, but wit

Re: RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-10-02 Thread Peter Zijlstra
On Thu, Oct 02, 2014 at 02:50:52PM +0200, Peter Zijlstra wrote: > On Thu, Oct 02, 2014 at 02:31:17PM +0200, Andrea Arcangeli wrote: > > On Wed, Oct 01, 2014 at 05:36:11PM +0200, Peter Zijlstra wrote: > > > For all these and the other _fast() users, is there an actual limit to > > > the nr_pages pas

Re: RFC: get_user_pages_locked|unlocked to leverage VM_FAULT_RETRY

2014-10-02 Thread Andrea Arcangeli
On Thu, Oct 02, 2014 at 02:56:38PM +0200, Peter Zijlstra wrote: > On Thu, Oct 02, 2014 at 02:50:52PM +0200, Peter Zijlstra wrote: > > On Thu, Oct 02, 2014 at 02:31:17PM +0200, Andrea Arcangeli wrote: > > > On Wed, Oct 01, 2014 at 05:36:11PM +0200, Peter Zijlstra wrote: > > > > For all these and the