Re: [PATCHv3 6/6] mm/gup: Cache dev_pagemap while pinning pages

2018-10-02 Thread Keith Busch
On Tue, Oct 02, 2018 at 08:49:39AM -0700, Dave Hansen wrote: > On 10/02/2018 04:26 AM, Kirill A. Shutemov wrote: > >> + page = follow_page_mask(vma, address, foll_flags, &ctx); > >> + if (ctx.pgmap) > >> + put_dev_pagemap(ctx.pgmap); > >> + return page; > >> } > > Do we still want to k

Re: [PATCHv3 6/6] mm/gup: Cache dev_pagemap while pinning pages

2018-10-02 Thread Dave Hansen
On 10/02/2018 04:26 AM, Kirill A. Shutemov wrote: >> +page = follow_page_mask(vma, address, foll_flags, &ctx); >> +if (ctx.pgmap) >> +put_dev_pagemap(ctx.pgmap); >> +return page; >> } > Do we still want to keep the function as inline? I don't think so. > Let's move it into

Re: [PATCHv3 6/6] mm/gup: Cache dev_pagemap while pinning pages

2018-10-02 Thread Kirill A. Shutemov
On Fri, Sep 21, 2018 at 10:39:56PM +, Keith Busch wrote: > Pinning pages from ZONE_DEVICE memory needs to check the backing device's > live-ness, which is tracked in the device's dev_pagemap metadata. This > metadata is stored in a radix tree and looking it up adds measurable > software overhea

[PATCHv3 6/6] mm/gup: Cache dev_pagemap while pinning pages

2018-09-21 Thread Keith Busch
Pinning pages from ZONE_DEVICE memory needs to check the backing device's live-ness, which is tracked in the device's dev_pagemap metadata. This metadata is stored in a radix tree and looking it up adds measurable software overhead. This patch avoids repeating this relatively costly operation when