Re: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-19 Thread Gerd Hoffmann
On Thu, Jun 08, 2023 at 01:49:27PM -0700, Mike Kravetz wrote: > This effectively reverts commit 16c243e99d33 ("udmabuf: Add support > for mapping hugepages (v4)"). Recently, Junxiao Chang found a BUG > with page map counting as described here [1]. This issue pointed out > that the udmabuf driver

Re: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-15 Thread David Hildenbrand
Skimming over at shmem_read_mapping_page() users, I assume most of them use a VM_PFNMAP mapping (or don't mmap them at all), where we won't be messing with the struct page at all. (That might even allow you to mmap hugetlb sub-pages, because the struct page -- and mapcount -- will be ignored c

RE: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-14 Thread Kasireddy, Vivek
Hi David, > > On 13.06.23 10:26, Kasireddy, Vivek wrote: > > Hi David, > > > >> > >> On 12.06.23 09:10, Kasireddy, Vivek wrote: > >>> Hi Mike, > >> > >> Hi Vivek, > >> > >>> > >>> Sorry for the late reply; I just got back from vacation. > >>> If it is unsafe to directly use the subpages of a huge

Re: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-13 Thread Hugh Dickins
On Tue, 13 Jun 2023, David Hildenbrand wrote: > On 13.06.23 10:26, Kasireddy, Vivek wrote: > >> On 12.06.23 09:10, Kasireddy, Vivek wrote: > >>> Sorry for the late reply; I just got back from vacation. > >>> If it is unsafe to directly use the subpages of a hugetlb page, then > >>> reverting > >>>

Re: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-13 Thread David Hildenbrand
On 13.06.23 10:26, Kasireddy, Vivek wrote: Hi David, On 12.06.23 09:10, Kasireddy, Vivek wrote: Hi Mike, Hi Vivek, Sorry for the late reply; I just got back from vacation. If it is unsafe to directly use the subpages of a hugetlb page, then reverting this patch seems like the only option

RE: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-13 Thread David Laight
From: Kasireddy, Vivek > Sent: 13 June 2023 09:26 ... > > Is my understanding correct, that we can effectively long-term pin > > (worse than mlock) 64 MiB per UDMABUF_CREATE, allowing eventually !root > > users > > The 64 MiB limit is the theoretical upper bound that we have not seen hit in > prac

RE: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-13 Thread Kasireddy, Vivek
Hi David, > > On 12.06.23 09:10, Kasireddy, Vivek wrote: > > Hi Mike, > > Hi Vivek, > > > > > Sorry for the late reply; I just got back from vacation. > > If it is unsafe to directly use the subpages of a hugetlb page, then > > reverting > > this patch seems like the only option for addressing

Re: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-12 Thread David Hildenbrand
On 12.06.23 09:10, Kasireddy, Vivek wrote: Hi Mike, Hi Vivek, Sorry for the late reply; I just got back from vacation. If it is unsafe to directly use the subpages of a hugetlb page, then reverting this patch seems like the only option for addressing this issue immediately. So, this patch is

RE: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-12 Thread Kasireddy, Vivek
Hi Mike, Sorry for the late reply; I just got back from vacation. If it is unsafe to directly use the subpages of a hugetlb page, then reverting this patch seems like the only option for addressing this issue immediately. So, this patch is Acked-by: Vivek Kasireddy As far as the use-case is conc

Re: [PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-08 Thread Greg Kroah-Hartman
On Thu, Jun 08, 2023 at 01:49:27PM -0700, Mike Kravetz wrote: > This effectively reverts commit 16c243e99d33 ("udmabuf: Add support > for mapping hugepages (v4)"). Recently, Junxiao Chang found a BUG > with page map counting as described here [1]. This issue pointed out > that the udmabuf driver

[PATCH] udmabuf: revert 'Add support for mapping hugepages (v4)'

2023-06-08 Thread Mike Kravetz
This effectively reverts commit 16c243e99d33 ("udmabuf: Add support for mapping hugepages (v4)"). Recently, Junxiao Chang found a BUG with page map counting as described here [1]. This issue pointed out that the udmabuf driver was making direct use of subpages of hugetlb pages. This is not a goo