Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-11-05 Thread Daniel Vetter
On Thu, Oct 28, 2021 at 04:42:56PM -0300, Jason Gunthorpe wrote: > On Thu, Oct 28, 2021 at 05:14:52PM +0200, Daniel Vetter wrote: > > Hm totally lost this, I'm trying to not be too responsible for mm changes > > since it scares me :-) Plus dropping this very late in the release feels a > > bit risk

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-28 Thread Jason Gunthorpe
On Thu, Oct 28, 2021 at 05:14:52PM +0200, Daniel Vetter wrote: > Hm totally lost this, I'm trying to not be too responsible for mm changes > since it scares me :-) Plus dropping this very late in the release feels a > bit risky. > > Ok if I stuff this into drm-next instead? Sure Jason

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-28 Thread Daniel Vetter
On Fri, Oct 22, 2021 at 03:57:42PM -0300, Jason Gunthorpe wrote: > On Thu, Oct 21, 2021 at 01:41:39PM +0200, Daniel Vetter wrote: > > On Wed, Oct 20, 2021 at 04:37:02PM -0300, Jason Gunthorpe wrote: > > > On Wed, Oct 20, 2021 at 08:41:24AM +0200, Christian König wrote: > > > > > > > > I think the

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-22 Thread Jason Gunthorpe
On Thu, Oct 21, 2021 at 01:40:30PM +0200, Daniel Vetter wrote: > On Wed, Oct 20, 2021 at 11:09:58AM -0300, Jason Gunthorpe wrote: > > On Wed, Oct 20, 2021 at 08:34:33AM +0200, Thomas Hellström wrote: > > > > > Follow up question: If we resurrect this in the proper way (and in that > > > case > >

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-22 Thread Jason Gunthorpe
On Thu, Oct 21, 2021 at 01:41:39PM +0200, Daniel Vetter wrote: > On Wed, Oct 20, 2021 at 04:37:02PM -0300, Jason Gunthorpe wrote: > > On Wed, Oct 20, 2021 at 08:41:24AM +0200, Christian König wrote: > > > > > > I think the patch subject needs updating to reflect that we're disabling > > > > PUD/PM

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-21 Thread Daniel Vetter
On Wed, Oct 20, 2021 at 04:37:02PM -0300, Jason Gunthorpe wrote: > On Wed, Oct 20, 2021 at 08:41:24AM +0200, Christian König wrote: > > > > I think the patch subject needs updating to reflect that we're disabling > > > PUD/PMDs completely. > > > With that fixed, > > Everyone is OK with this? > >

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-21 Thread Daniel Vetter
On Wed, Oct 20, 2021 at 11:09:58AM -0300, Jason Gunthorpe wrote: > On Wed, Oct 20, 2021 at 08:34:33AM +0200, Thomas Hellström wrote: > > > Follow up question: If we resurrect this in the proper way (and in that case > > only for x86_64) is there something we need to pay particular attention to > >

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-21 Thread Thomas Hellström
On Thu, 2021-10-21 at 09:04 +0200, Christian König wrote: > Works for me. +1 /Thomas > > Am 20.10.21 um 21:37 schrieb Jason Gunthorpe: > > On Wed, Oct 20, 2021 at 08:41:24AM +0200, Christian König wrote: > > > > > > I think the patch subject needs updating to reflect that we're > > > > disabli

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-21 Thread Christian König
Works for me. Am 20.10.21 um 21:37 schrieb Jason Gunthorpe: On Wed, Oct 20, 2021 at 08:41:24AM +0200, Christian König wrote: I think the patch subject needs updating to reflect that we're disabling PUD/PMDs completely. With that fixed, Everyone is OK with this? drm/ttm: remove ttm_bo_vm_inse

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-20 Thread Jason Gunthorpe
On Wed, Oct 20, 2021 at 08:41:24AM +0200, Christian König wrote: > > I think the patch subject needs updating to reflect that we're disabling > > PUD/PMDs completely. > > With that fixed, Everyone is OK with this? drm/ttm: remove ttm_bo_vm_insert_huge() The huge page functionality in TTM does n

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-20 Thread Jason Gunthorpe
On Wed, Oct 20, 2021 at 08:34:33AM +0200, Thomas Hellström wrote: > Follow up question: If we resurrect this in the proper way (and in that case > only for x86_64) is there something we need to pay particular attention to > WRT the ZONE_DEVICE refcounting fixing you mention above? Similar to PTE

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-19 Thread Thomas Hellström
On 10/20/21 08:41, Christian König wrote: Am 20.10.21 um 08:34 schrieb Thomas Hellström: On 10/20/21 01:27, Jason Gunthorpe wrote: PUD and PMD entries do not have a special bit. get_user_pages_fast() considers any page that passed pmd_huge() as usable: if (unlikely(pmd_trans_huge(pmd)

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-19 Thread Christian König
Am 20.10.21 um 08:34 schrieb Thomas Hellström: On 10/20/21 01:27, Jason Gunthorpe wrote: PUD and PMD entries do not have a special bit. get_user_pages_fast() considers any page that passed pmd_huge() as usable: if (unlikely(pmd_trans_huge(pmd) || pmd_huge(pmd) || pmd_devmap(p

Re: [PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-19 Thread Thomas Hellström
On 10/20/21 01:27, Jason Gunthorpe wrote: PUD and PMD entries do not have a special bit. get_user_pages_fast() considers any page that passed pmd_huge() as usable: if (unlikely(pmd_trans_huge(pmd) || pmd_huge(pmd) || pmd_devmap(pmd))) { And vmf_insert_pfn_pmd_pro

[PATCH v2] drm/ttm: Do not put non-struct page memory into PUD/PMDs

2021-10-19 Thread Jason Gunthorpe
PUD and PMD entries do not have a special bit. get_user_pages_fast() considers any page that passed pmd_huge() as usable: if (unlikely(pmd_trans_huge(pmd) || pmd_huge(pmd) || pmd_devmap(pmd))) { And vmf_insert_pfn_pmd_prot() unconditionally sets entry = pmd_