Re: [PATCH v2 2/2] udmabuf: Add back support for mapping hugetlb pages (v2)

2023-07-27 Thread Peter Xu
On Wed, Jul 19, 2023 at 05:42:54AM +, Kasireddy, Vivek wrote: > > > + } else { > > > + page = > > shmem_read_mapping_page(mapping, pgoff + pgidx); > > > > It may not matter to your users, but the semantics for hugetlb and shmem > > pages is different. h

Re: [PATCH v2 2/2] udmabuf: Add back support for mapping hugetlb pages (v2)

2023-07-19 Thread Mike Kravetz
On 07/18/23 01:26, Vivek Kasireddy wrote: > A user or admin can configure a VMM (Qemu) Guest's memory to be > backed by hugetlb pages for various reasons. However, a Guest OS > would still allocate (and pin) buffers that are backed by regular > 4k sized pages. In order to map these buffers and crea

RE: [PATCH v2 2/2] udmabuf: Add back support for mapping hugetlb pages (v2)

2023-07-18 Thread Kasireddy, Vivek
Hi Mike, > > On 07/18/23 01:26, Vivek Kasireddy wrote: > > A user or admin can configure a VMM (Qemu) Guest's memory to be > > backed by hugetlb pages for various reasons. However, a Guest OS > > would still allocate (and pin) buffers that are backed by regular > > 4k sized pages. In order to map

Re: [PATCH v2 2/2] udmabuf: Add back support for mapping hugetlb pages (v2)

2023-07-18 Thread David Hildenbrand
On 18.07.23 10:26, Vivek Kasireddy wrote: A user or admin can configure a VMM (Qemu) Guest's memory to be backed by hugetlb pages for various reasons. However, a Guest OS would still allocate (and pin) buffers that are backed by regular 4k sized pages. In order to map these buffers and create dma

[PATCH v2 2/2] udmabuf: Add back support for mapping hugetlb pages (v2)

2023-07-18 Thread Vivek Kasireddy
A user or admin can configure a VMM (Qemu) Guest's memory to be backed by hugetlb pages for various reasons. However, a Guest OS would still allocate (and pin) buffers that are backed by regular 4k sized pages. In order to map these buffers and create dma-bufs for them on the Host, we first need to