mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-19 18:50:23 +07:00
5459ceedb3
This code was using get_user_pages*(), in a "Case 2" scenario (DMA/RDMA), using the categorization from [1]. That means that it's time to convert the get_user_pages*() + put_page() calls to pin_user_pages*() + unpin_user_pages() calls. There is some helpful background in [2]: basically, this is a small part of fixing a long-standing disconnect between pinning pages, and file systems' use of those pages. Note that this effectively changes the code's behavior as well: it now ultimately calls set_page_dirty_lock(), instead of SetPageDirty(). This is probably more accurate. As Christoph Hellwig put it, "set_page_dirty() is only safe if we are dealing with a file backed page where we have reference on the inode it hangs off." [3] [1] Documentation/core-api/pin_user_pages.rst [2] "Explicit pinning of user-space pages": https://lwn.net/Articles/807108/ [3] https://lore.kernel.org/r/20190723153640.GB720@lst.de Signed-off-by: John Hubbard <jhubbard@nvidia.com> Link: https://lore.kernel.org/r/20200518041307.1987328-1-jhubbard@nvidia.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> |
||
---|---|---|
.. | ||
Makefile | ||
scif_api.c | ||
scif_debugfs.c | ||
scif_dma.c | ||
scif_epd.c | ||
scif_epd.h | ||
scif_fd.c | ||
scif_fence.c | ||
scif_main.c | ||
scif_main.h | ||
scif_map.h | ||
scif_mmap.c | ||
scif_nm.c | ||
scif_nodeqp.c | ||
scif_nodeqp.h | ||
scif_peer_bus.c | ||
scif_peer_bus.h | ||
scif_ports.c | ||
scif_rb.c | ||
scif_rb.h | ||
scif_rma_list.c | ||
scif_rma_list.h | ||
scif_rma.c | ||
scif_rma.h |