All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH RFC 0/3] MAP_POPULATE for device memory
@ 2022-03-06  5:32 ` Jarkko Sakkinen
  0 siblings, 0 replies; 68+ messages in thread
From: Jarkko Sakkinen @ 2022-03-06  5:32 UTC (permalink / raw)
  To: linux-mm
  Cc: Michal Hocko, zhangyiru, Daniel Vetter, Dave Hansen, dri-devel,
	Chris Wilson, Alexander Mikhalitsyn, Florian Fainelli,
	linux-unionfs, codalist, Matthew Auld, Vasily Averin,
	Thomas Hellström, intel-gfx, linux-mips, Shakeel Butt,
	Reinette Chatre, linux-sgx, Thomas Bogendoerfer,
	Nathaniel McCallum, Greg Kroah-Hartman, linux-kernel,
	Jarkko Sakkinen, linux-fsdevel, Andrew Morton, Alexey Gladkov

For device memory (aka VM_IO | VM_PFNMAP) MAP_POPULATE does nothing. Allow
to use that for initializing the device memory by providing a new callback
f_ops->populate() for the purpose.

SGX patches are provided to show the callback in context.

An obvious alternative is a ioctl but it is less elegant and requires
two syscalls (mmap + ioctl) per memory range, instead of just one
(mmap).

Jarkko Sakkinen (3):
  mm: Add f_ops->populate()
  x86/sgx: Export sgx_encl_page_alloc()
  x86/sgx: Implement EAUG population with MAP_POPULATE

 arch/mips/kernel/vdso.c                    |   2 +-
 arch/x86/kernel/cpu/sgx/driver.c           | 129 +++++++++++++++++++++
 arch/x86/kernel/cpu/sgx/encl.c             |  38 ++++++
 arch/x86/kernel/cpu/sgx/encl.h             |   3 +
 arch/x86/kernel/cpu/sgx/ioctl.c            |  38 ------
 drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c |   2 +-
 fs/coda/file.c                             |   2 +-
 fs/overlayfs/file.c                        |   2 +-
 include/linux/fs.h                         |  12 +-
 include/linux/mm.h                         |   2 +-
 ipc/shm.c                                  |   2 +-
 mm/mmap.c                                  |  10 +-
 mm/nommu.c                                 |   4 +-
 13 files changed, 193 insertions(+), 53 deletions(-)

-- 
2.35.1


^ permalink raw reply	[flat|nested] 68+ messages in thread

end of thread, other threads:[~2022-03-08 12:51 UTC | newest]

Thread overview: 68+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-06  5:32 [Intel-gfx] [PATCH RFC 0/3] MAP_POPULATE for device memory Jarkko Sakkinen
2022-03-06  5:32 ` Jarkko Sakkinen
2022-03-06  5:32 ` Jarkko Sakkinen
2022-03-06  5:32 ` [Intel-gfx] [PATCH RFC 1/3] mm: Add f_ops->populate() Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06 10:01   ` [Intel-gfx] " Greg Kroah-Hartman
2022-03-06 10:01     ` Greg Kroah-Hartman
2022-03-06 10:01     ` Greg Kroah-Hartman
2022-03-06 17:02     ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06 17:02       ` Jarkko Sakkinen
2022-03-06 17:02       ` Jarkko Sakkinen
2022-03-06 17:03       ` [Intel-gfx] " Jarkko Sakkinen
2022-03-06 17:03         ` Jarkko Sakkinen
2022-03-06 17:03         ` Jarkko Sakkinen
2022-03-06 22:43       ` [Intel-gfx] " Matthew Wilcox
2022-03-06 22:43         ` Matthew Wilcox
2022-03-06 22:43         ` Matthew Wilcox
2022-03-07 13:16         ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 13:16           ` Jarkko Sakkinen
2022-03-07 13:16           ` Jarkko Sakkinen
2022-03-07 13:26           ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 13:26             ` Jarkko Sakkinen
2022-03-07 13:26             ` Jarkko Sakkinen
2022-03-06  5:32 ` [Intel-gfx] [PATCH RFC 2/3] x86/sgx: Export sgx_encl_page_alloc() Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06  5:32 ` [Intel-gfx] [PATCH RFC 3/3] x86/sgx: Implement EAUG population with MAP_POPULATE Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06  5:32   ` Jarkko Sakkinen
2022-03-06  8:30 ` [Intel-gfx] [PATCH RFC 0/3] MAP_POPULATE for device memory David Laight
2022-03-06  8:30   ` David Laight
2022-03-06  8:30   ` David Laight
2022-03-06 16:52   ` [Intel-gfx] " 'Jarkko Sakkinen'
2022-03-06 16:52     ` 'Jarkko Sakkinen'
2022-03-06 16:52     ` 'Jarkko Sakkinen'
2022-03-06 11:33 ` [Intel-gfx] " Matthew Wilcox
2022-03-06 11:33   ` Matthew Wilcox
2022-03-06 11:33   ` Matthew Wilcox
2022-03-07  7:48   ` [Intel-gfx] " Christoph Hellwig
2022-03-07  7:48     ` Christoph Hellwig
2022-03-07 13:29     ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 13:29       ` Jarkko Sakkinen
2022-03-07 13:29       ` Jarkko Sakkinen
2022-03-07 15:56       ` [Intel-gfx] " Christoph Hellwig
2022-03-07 15:56         ` Christoph Hellwig
2022-03-07 15:58         ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 15:58           ` Jarkko Sakkinen
2022-03-07 15:58           ` Jarkko Sakkinen
2022-03-07 22:11         ` [Intel-gfx] " David Laight
2022-03-07 22:11           ` David Laight
2022-03-07 22:11           ` David Laight
2022-03-08 10:10           ` [Intel-gfx] " Jarkko Sakkinen
2022-03-08 10:10             ` Jarkko Sakkinen
2022-03-08 10:10             ` Jarkko Sakkinen
2022-03-07 10:12 ` [Intel-gfx] " David Hildenbrand
2022-03-07 10:12   ` David Hildenbrand
2022-03-07 10:12   ` David Hildenbrand
2022-03-07 14:22   ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 14:22     ` Jarkko Sakkinen
2022-03-07 14:22     ` Jarkko Sakkinen
2022-03-07 14:33     ` [Intel-gfx] " David Hildenbrand
2022-03-07 14:33       ` David Hildenbrand
2022-03-07 14:33       ` David Hildenbrand
2022-03-07 15:49       ` [Intel-gfx] " Jarkko Sakkinen
2022-03-07 15:49         ` Jarkko Sakkinen
2022-03-07 15:49         ` Jarkko Sakkinen
2022-03-07 14:23 ` [Intel-gfx] ✗ Fi.CI.BUILD: failure for " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.