On Thu, Jun 13, 2019 at 07:58:29PM +0000, Jason Gunthorpe wrote:> On Thu, Jun 13, 2019 at 12:53:02PM -0700, Ralph Campbell wrote: > > > > On 6/13/19 12:44 PM, Jason Gunthorpe wrote: > > > On Thu, Jun 13, 2019 at 11:43:21AM +0200, Christoph Hellwig wrote: > > > > The code hasn't been used since it was added to the tree, and doesn't > > > > appear to actually be usable. Mark it as BROKEN until either a user > > > > comes along or we finally give up on it. > > > > > > > > Signed-off-by: Christoph Hellwig <hch at lst.de> > > > > mm/Kconfig | 1 + > > > > 1 file changed, 1 insertion(+) > > > > > > > > diff --git a/mm/Kconfig b/mm/Kconfig > > > > index 0d2ba7e1f43e..406fa45e9ecc 100644 > > > > +++ b/mm/Kconfig > > > > @@ -721,6 +721,7 @@ config DEVICE_PRIVATE > > > > config DEVICE_PUBLIC > > > > bool "Addressable device memory (like GPU memory)" > > > > depends on ARCH_HAS_HMM > > > > + depends on BROKEN > > > > select HMM > > > > select DEV_PAGEMAP_OPS > > > > > > This seems a bit harsh, we do have another kconfig that selects this > > > one today: > > > > > > config DRM_NOUVEAU_SVM > > > bool "(EXPERIMENTAL) Enable SVM (Shared Virtual Memory) support" > > > depends on ARCH_HAS_HMM > > > depends on DRM_NOUVEAU > > > depends on STAGING > > > select HMM_MIRROR > > > select DEVICE_PRIVATE > > > default n > > > help > > > Say Y here if you want to enable experimental support for > > > Shared Virtual Memory (SVM). > > > > > > Maybe it should be depends on STAGING not broken? > > > > > > or maybe nouveau_svm doesn't actually need DEVICE_PRIVATE? > > > > > > Jason > > > > I think you are confusing DEVICE_PRIVATE for DEVICE_PUBLIC. > > DRM_NOUVEAU_SVM does use DEVICE_PRIVATE but not DEVICE_PUBLIC. > > Indeed you are correct, never mind > > Hum, so the only thing this config does is short circuit here: > > static inline bool is_device_public_page(const struct page *page) > { > return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && > IS_ENABLED(CONFIG_DEVICE_PUBLIC) && > is_zone_device_page(page) && > page->pgmap->type == MEMORY_DEVICE_PUBLIC; > } > > Which is called all over the place..<sigh> yes but the earlier patch: [PATCH 03/22] mm: remove hmm_devmem_add_resource Removes the only place type is set to MEMORY_DEVICE_PUBLIC. So I think it is ok. Frankly I was wondering if we should remove the public type altogether but conceptually it seems ok. But I don't see any users of it so... should we get rid of it in the code rather than turning the config off? Ira> > So, yes, we really don't want any distro or something to turn this on > until it has a use. > > Reviewed-by: Jason Gunthorpe <jgg at mellanox.com> > > Jason > _______________________________________________ > Linux-nvdimm mailing list > Linux-nvdimm at lists.01.org > https://lists.01.org/mailman/listinfo/linux-nvdimm
John Hubbard
2019-Jun-14 01:23 UTC
[Nouveau] [PATCH 18/22] mm: mark DEVICE_PUBLIC as broken
On 6/13/19 5:43 PM, Ira Weiny wrote:> On Thu, Jun 13, 2019 at 07:58:29PM +0000, Jason Gunthorpe wrote: >> On Thu, Jun 13, 2019 at 12:53:02PM -0700, Ralph Campbell wrote: >>>...>> Hum, so the only thing this config does is short circuit here: >> >> static inline bool is_device_public_page(const struct page *page) >> { >> return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && >> IS_ENABLED(CONFIG_DEVICE_PUBLIC) && >> is_zone_device_page(page) && >> page->pgmap->type == MEMORY_DEVICE_PUBLIC; >> } >> >> Which is called all over the place.. > > <sigh> yes but the earlier patch: > > [PATCH 03/22] mm: remove hmm_devmem_add_resource > > Removes the only place type is set to MEMORY_DEVICE_PUBLIC. > > So I think it is ok. Frankly I was wondering if we should remove the public > type altogether but conceptually it seems ok. But I don't see any users of it > so... should we get rid of it in the code rather than turning the config off? > > IraThat seems reasonable. I recall that the hope was for those IBM Power 9 systems to use _PUBLIC, as they have hardware-based coherent device (GPU) memory, and so the memory really is visible to the CPU. And the IBM team was thinking of taking advantage of it. But I haven't seen anything on that front for a while. So maybe it will get re-added as part of a future patchset to use that kind of memory, but yes, we should not hesitate to clean house at this point, and delete unused code. thanks, -- John Hubbard NVIDIA> >> >> So, yes, we really don't want any distro or something to turn this on >> until it has a use. >> >> Reviewed-by: Jason Gunthorpe <jgg at mellanox.com> >> >> Jason >> _______________________________________________ >> Linux-nvdimm mailing list >> Linux-nvdimm at lists.01.org >> https://lists.01.org/mailman/listinfo/linux-nvdimm
Christoph Hellwig
2019-Jun-14 06:43 UTC
[Nouveau] [PATCH 18/22] mm: mark DEVICE_PUBLIC as broken
On Thu, Jun 13, 2019 at 05:43:15PM -0700, Ira Weiny wrote:> <sigh> yes but the earlier patch: > > [PATCH 03/22] mm: remove hmm_devmem_add_resource > > Removes the only place type is set to MEMORY_DEVICE_PUBLIC. > > So I think it is ok. Frankly I was wondering if we should remove the public > type altogether but conceptually it seems ok. But I don't see any users of it > so... should we get rid of it in the code rather than turning the config off?That was my original idea. But then again Jerome spent a lot of effort putting hooks for it all over the mm and it would seem a little root to just rip this out ASAP. I'll give it some more time, but it it doesn't get used after a few more kernel releases we should nuke it.
Jason Gunthorpe
2019-Jun-19 19:27 UTC
[Nouveau] [PATCH 18/22] mm: mark DEVICE_PUBLIC as broken
On Thu, Jun 13, 2019 at 06:23:04PM -0700, John Hubbard wrote:> On 6/13/19 5:43 PM, Ira Weiny wrote: > > On Thu, Jun 13, 2019 at 07:58:29PM +0000, Jason Gunthorpe wrote: > >> On Thu, Jun 13, 2019 at 12:53:02PM -0700, Ralph Campbell wrote: > >>> > ... > >> Hum, so the only thing this config does is short circuit here: > >> > >> static inline bool is_device_public_page(const struct page *page) > >> { > >> return IS_ENABLED(CONFIG_DEV_PAGEMAP_OPS) && > >> IS_ENABLED(CONFIG_DEVICE_PUBLIC) && > >> is_zone_device_page(page) && > >> page->pgmap->type == MEMORY_DEVICE_PUBLIC; > >> } > >> > >> Which is called all over the place.. > > > > <sigh> yes but the earlier patch: > > > > [PATCH 03/22] mm: remove hmm_devmem_add_resource > > > > Removes the only place type is set to MEMORY_DEVICE_PUBLIC. > > > > So I think it is ok. Frankly I was wondering if we should remove the public > > type altogether but conceptually it seems ok. But I don't see any users of it > > so... should we get rid of it in the code rather than turning the config off? > > > > Ira > > That seems reasonable. I recall that the hope was for those IBM Power 9 > systems to use _PUBLIC, as they have hardware-based coherent device (GPU) > memory, and so the memory really is visible to the CPU. And the IBM team > was thinking of taking advantage of it. But I haven't seen anything on > that front for a while.Does anyone know who those people are and can we encourage them to send some patches? :) Jason