Re: can we finally kill off CONFIG_FS_DAX_LIMITED

Gerald Schaefer
2021-08-23T19:47:23Z

On Mon, 23 Aug 2021 16:05:46 +0200
Gerald Schaefer <gerald.schaefer@linux.ibm.com> wrote:

> On Fri, 20 Aug 2021 07:43:40 +0200
> Christoph Hellwig <hch@lst.de> wrote:
>
> > Hi all,
> >
> > looking at the recent ZONE_DEVICE related changes we still have a
> > horrible maze of different code paths. I already suggested to
> > depend on ARCH_HAS_PTE_SPECIAL for ZONE_DEVICE there, which all modern

Oh, we do have PTE_SPECIAL, actually that took away the last free bit
in the pte. So, if there is a chance that ZONE_DEVICE would depend
on PTE_SPECIAL instead of PTE_DEVMAP, we might be back in the game
and get rid of that CONFIG_FS_DAX_LIMITED.

Or did you rather mean depend on ARCH_HAS_PTE_SPECIAL on top of
ARCH_HAS_PTE_DEVMAP?

> > architectures have anyway. But the other odd special case is
> > CONFIG_FS_DAX_LIMITED which is just used for the xpram driver. Does
> > this driver still see use? If so can we make it behave like the
> > other DAX drivers and require a pgmap? I think the biggest missing
> > part would be to implement ARCH_HAS_PTE_DEVMAP for s390.
>
> Puh, yes, that seems to be needed in order to enable ZONE_DEVICE, and
> then we could use devm_memremap_pages(), at least that was my plan
> some time ago. However, either the ARCH_HAS_PTE_DEVMAP dependency
> is new, or I overlooked it before, but we do not have any free bits
> in the pte left, so this is not going to work.
>
> Would it strictly be necessary to implement ZONE_DEVICE, or would
> it be enough if we would use e.g. add_memory() instead of just
> adding the DCSS memory directly to the kernel mapping via
> vmem_add_mapping()? That way we might at least get the struct pages,
> but somehow it doesn't feel completely right.