[RFC v1 0/3] udmabuf: Replace pages when there is FALLOC_FL_PUNCH_HOLE in memfd

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This patch series attempts to solve the coherency problem seen when
a hole is punched in the region(s) of the mapping (associated with
the memfd) that overlaps with pages registered with a udmabuf fd.

The first patch introduces a new mmu notifier to let drivers know
when a new page is faulted into a mapping (backed by shmem or
hugetlbfs). The second patch updates the udmabuf driver to
register a handler for receiving mapping updates in order to
update its list with new pages. The last patch adds two new tests
to the udmabuf selftest to test the huge page support and also
FALLOC_FL_PUNCH_HOLE.

Cc: David Hildenbrand <david@xxxxxxxxxx>
Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Peter Xu <peterx@xxxxxxxxxx>
Cc: Jason Gunthorpe <jgg@xxxxxxxxxx>
Cc: Gerd Hoffmann <kraxel@xxxxxxxxxx>
Cc: Dongwon Kim <dongwon.kim@xxxxxxxxx>
Cc: Junxiao Chang <junxiao.chang@xxxxxxxxx>

Vivek Kasireddy (3):
  mm/mmu_notifier: Add a new notifier for mapping updates (new pages)
  udmabuf: Replace pages when there is FALLOC_FL_PUNCH_HOLE in memfd
  selftests/dma-buf/udmabuf: Add tests for huge pages and
    FALLOC_FL_PUNCH_HOLE

 drivers/dma-buf/udmabuf.c                     | 172 ++++++++++++++++++
 include/linux/mmu_notifier.h                  |  27 +++
 mm/hugetlb.c                                  |   9 +-
 mm/mmu_notifier.c                             |  17 ++
 mm/shmem.c                                    |   7 +-
 .../selftests/drivers/dma-buf/udmabuf.c       | 165 ++++++++++++++++-
 6 files changed, 391 insertions(+), 6 deletions(-)

-- 
2.39.2





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux