Message ID | 166329930818.2786261.6086109734008025807.stgit@dwillia2-xfh.jf.intel.com (mailing list archive) |
---|---|
Headers | show |
Series | Fix the DAX-gup mistake | expand |
On Thu, Sep 15, 2022 at 08:35:08PM -0700, Dan Williams wrote: > This hackery continues the status of DAX pages as special cases in the > VM. The thought being carrying the Xarray / mapping infrastructure > forward still allows for the continuation of the page-less DAX effort. > Otherwise, the work to convert DAX pages to behave like typical > vm_normal_page() needs more investigation to untangle transparent huge > page assumptions. I see it differently, ZONE_DEVICE by definition is page-based. As long as DAX is using ZONE_DEVICE it should follow the normal struct page rules, including proper reference counting everywhere. By not doing this DAX is causing all ZONE_DEVICE users to suffer because we haven't really special cased just DAX out of all the other users. If there is some kind of non-struct page future, then it will not be ZONE_DEVICE and it will have its own mechanisms, somehow. So, we should be systematically stripping away all the half-backed non-struct page stuff from ZONE_DEVICE as a matter of principle. DAX included, whatever DAX's future may hold. The pte bit and the missing refcounting in the page table paths is the remaining big issue and I hope we fix it. The main problem is that FS-DAX must create compound pages for the 2M page size. Jason
Jason Gunthorpe wrote: > On Thu, Sep 15, 2022 at 08:35:08PM -0700, Dan Williams wrote: > > > This hackery continues the status of DAX pages as special cases in the > > VM. The thought being carrying the Xarray / mapping infrastructure > > forward still allows for the continuation of the page-less DAX effort. > > Otherwise, the work to convert DAX pages to behave like typical > > vm_normal_page() needs more investigation to untangle transparent huge > > page assumptions. > > I see it differently, ZONE_DEVICE by definition is page-based. As long > as DAX is using ZONE_DEVICE it should follow the normal struct page > rules, including proper reference counting everywhere. > > By not doing this DAX is causing all ZONE_DEVICE users to suffer > because we haven't really special cased just DAX out of all the other > users. > > If there is some kind of non-struct page future, then it will not be > ZONE_DEVICE and it will have its own mechanisms, somehow. > > So, we should be systematically stripping away all the half-backed > non-struct page stuff from ZONE_DEVICE as a matter of principle. DAX > included, whatever DAX's future may hold. > > The pte bit and the missing refcounting in the page table paths is the > remaining big issue and I hope we fix it. The main problem is that > FS-DAX must create compound pages for the 2M page size. Yes, this is how I see it too. Without serious help from folks that want to kill struct-page usage with DAX the next step will be dynamic compound page metadata initialization whenever a PMD entry is installed.
All seems to be quiet on this front, so I plan to move this series into mm-stable a few days from now. We do have this report of dax_holder_notify_failure being unavailable with CONFIG_DAX=n: https://lkml.kernel.org/r/202210230716.tNv8A5mN-lkp@intel.com but that appears to predate this series.
On Tue 08-11-22 16:20:59, Andrew Morton wrote: > All seems to be quiet on this front, so I plan to move this series into > mm-stable a few days from now. > > We do have this report of dax_holder_notify_failure being unavailable > with CONFIG_DAX=n: > https://lkml.kernel.org/r/202210230716.tNv8A5mN-lkp@intel.com but that > appears to predate this series. Andrew, there has been v3 some time ago [1] and even that gathered some non-trivial feedback from Jason so I don't think this is settled... [1] https://lore.kernel.org/all/166579181584.2236710.17813547487183983273.stgit@dwillia2-xfh.jf.intel.com Honza