On Wed, Sep 19, 2018 at 02:15:28PM -0700, Dave Hansen wrote: > On 09/19/2018 02:02 PM, Keith Busch wrote: > > Pinning user pages out of nvdimm dax memory is significantly slower > > compared to system ram. Analysis points to software overhead incurred > > from a radix tree lookup. This patch series fixes that by removing the > > relatively costly dev_pagemap lookup that was repeated for each page, > > significantly increasing gup time. > > Could you also remind us why DAX pages are such special snowflakes and > *require* radix tree lookups in the first place? Yeah, ZONE_DEVICE memory is special. It has struct page mappings, but not for online general use. The dev_pagemap is the metadata to the zone device memory, and that metadata is stashed in a radix tree. We're looking up the dev_pagemap in this path to take a reference so the zone device can't be unmapped.