]> Git Repo - linux.git/commit
mm/gup: migrate device coherent pages when pinning instead of failing
authorAlistair Popple <[email protected]>
Fri, 15 Jul 2022 15:05:13 +0000 (10:05 -0500)
committerakpm <[email protected]>
Mon, 18 Jul 2022 00:14:28 +0000 (17:14 -0700)
commitb05a79d4377f6dcc30683008ffd1c531ea965393
tree4f491e0db9d5560f1f0a41bd0522938093f32a7c
parentdd19e6d8ffaa1289d75d7833de97faf1b6b2c8e4
mm/gup: migrate device coherent pages when pinning instead of failing

Currently any attempts to pin a device coherent page will fail.  This is
because device coherent pages need to be managed by a device driver, and
pinning them would prevent a driver from migrating them off the device.

However this is no reason to fail pinning of these pages.  These are
coherent and accessible from the CPU so can be migrated just like pinning
ZONE_MOVABLE pages.  So instead of failing all attempts to pin them first
try migrating them out of ZONE_DEVICE.

[[email protected]: rebased to the split device memory checks, moved migrate_device_page to migrate_device.c]
Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: Alistair Popple <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Acked-by: Felix Kuehling <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: Jason Gunthorpe <[email protected]>
Cc: Jerome Glisse <[email protected]>
Cc: Matthew Wilcox <[email protected]>
Cc: Ralph Campbell <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
mm/gup.c
mm/internal.h
mm/migrate_device.c
This page took 0.055232 seconds and 4 git commands to generate.