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

2021-06-09 Thread Gerd Hoffmann
On Wed, Jun 09, 2021 at 11:29:15AM -0700, Vivek Kasireddy wrote: > If the VMM's (Qemu) memory backend is backed up by memfd + Hugepages > (hugetlbfs and not THP), we have to first find the hugepage(s) where > the Guest allocations are located and then extract the regular 4k > sized subpages from th

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

2021-06-09 Thread Vivek Kasireddy
If the VMM's (Qemu) memory backend is backed up by memfd + Hugepages (hugetlbfs and not THP), we have to first find the hugepage(s) where the Guest allocations are located and then extract the regular 4k sized subpages from them. v2: Ensure that the subpage and hugepage offsets are calculated corr

Re: [PATCH] udmabuf: Add support for mapping hugepages (v3)

2021-06-08 Thread Gerd Hoffmann
Hi, > + hpage = find_get_page_flags( checkpatch doesn't like that: -:76: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' > + page = shmem_read_mapping_page( Same here. take care, Gerd

Re: [PATCH] udmabuf: Add support for mapping hugepages (v3)

2021-06-08 Thread Gerd Hoffmann
On Tue, Jun 08, 2021 at 10:35:58AM -0700, Dongwon Kim wrote: > I see the number of entries in the list often exceeds list_limit > currently hardcoded to 1024 for full HD scanout resource (== > 1920*1080*4 bytes). Can we include a change to increase it to something > like 4096 or higher in this patc

Re: [PATCH] udmabuf: Add support for mapping hugepages (v3)

2021-06-08 Thread Dongwon Kim
I see the number of entries in the list often exceeds list_limit currently hardcoded to 1024 for full HD scanout resource (== 1920*1080*4 bytes). Can we include a change to increase it to something like 4096 or higher in this patch? On Fri, Jun 04, 2021 at 01:59:39PM -0700, Vivek Kasireddy wrote:

[PATCH] udmabuf: Add support for mapping hugepages (v3)

2021-06-04 Thread Vivek Kasireddy
If the VMM's (Qemu) memory backend is backed up by memfd + Hugepages (hugetlbfs and not THP), we have to first find the hugepage(s) where the Guest allocations are located and then extract the regular 4k sized subpages from them. v2: Ensure that the subpage and hugepage offsets are calculated corr

Re: [PATCH] udmabuf: Add support for mapping hugepages (v2)

2021-06-03 Thread Gerd Hoffmann
Hi, > for (pgidx = 0; pgidx < pgcnt; pgidx++) { > + if (is_file_hugepages(memfd)) { > + hpage = find_get_page_flags( > + file_inode(memfd)->i_mapping, > +

[PATCH] udmabuf: Add support for mapping hugepages (v2)

2021-06-03 Thread Vivek Kasireddy
If the VMM's (Qemu) memory backend is backed up by memfd + Hugepages (hugetlbfs and not THP), we have to first find the hugepage(s) where the Guest allocations are located and then extract the regular 4k sized subpages from them. v2: Ensure that the subpage offsets are calculated correctly when th

Re: [PATCH] udmabuf: Add support for mapping hugepages

2021-06-03 Thread Gerd Hoffmann
Hi, > + if (is_file_hugepages(memfd)) { > + hpstate = hstate_file(memfd); > + pgoff = list[i].offset >> huge_page_shift(hpstate); > + subpgoff = (list[i].offset & > + ~huge_page_mask(hpstate))

[PATCH] udmabuf: Add support for mapping hugepages

2021-06-03 Thread Vivek Kasireddy
If the VMM's (Qemu) memory backend is backed up by memfd + Hugepages (hugetlbfs and not THP), we have to first find the hugepage(s) where the Guest allocations are located and then extract the regular 4k sized subpages from them. Cc: Gerd Hoffmann Signed-off-by: Vivek Kasireddy --- drivers/dma-