From: Alex Sierra
The intention is to test device coherent type pages that have been
called through get user pages with PIN_LONGTERM flag set. These pages
should get migrated back to normal system memory.
Signed-off-by: Alex Sierra
Signed-off-by: Alistair Popple
Reviewed-by: Felix Kuehling
From: Alistair Popple
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
From: Alex Sierra
Test cases such as migrate_fault and migrate_multiple, were modified to
explicit migrate from device to sys memory without the need of page
faults, when using device coherent type.
Snapshot test case updated to read memory device type first and based
on that, get the proper
From: Alistair Popple
migrate_vma_setup() checks that a valid vma is passed so that the page
tables can be walked to find the pfns associated with a given address
range. However in some cases the pfns are already known, such as when
migrating device coherent pages during pin_user_pages() meaning
From: Alex Sierra
Add two more parameters to set spm_addr_dev0 & spm_addr_dev1
addresses. These two parameters configure the start SP
addresses for each device in test_hmm driver.
Consequently, this configures zone device type as coherent.
Signed-off-by: Alex Sierra
Acked-by: Felix Kuehling
From: Alex Sierra
Device Coherent type uses device memory that is coherently accesible by
the CPU. This could be shown as SP (special purpose) memory range
at the BIOS-e820 memory enumeration. If no SP memory is supported in
system, this could be faked by setting CONFIG_EFI_FAKE_MEMMAP.
From: Alex Sierra
In order to configure device coherent in test_hmm, two module parameters
should be passed, which correspond to the SP start address of each
device (2) spm_addr_dev0 & spm_addr_dev1. If no parameters are passed,
private device type is configured.
Signed-off-by: Alex Sierra
From: Alex Sierra
new ioctl cmd added to query zone device type. This will be
used once the test_hmm adds zone device coherent type.
Signed-off-by: Alex Sierra
Acked-by: Felix Kuehling
Reviewed-by: Alistair Poppple
Signed-off-by: Christoph Hellwig
---
lib/test_hmm.c | 23
From: Alex Sierra
Coherent device type memory on VRAM to RAM migration, has similar access
as System RAM from the CPU. This flag sets the source from the sender.
Which in Coherent type case, should be set as
MIGRATE_VMA_SELECT_DEVICE_COHERENT.
Signed-off-by: Alex Sierra
Reviewed-by: Felix
From: Alex Sierra
When CPU is connected throug XGMI, it has coherent
access to VRAM resource. In this case that resource
is taken from a table in the device gmc aperture base.
This resource is used along with the device type, which could
be DEVICE_PRIVATE or DEVICE_COHERENT to create the device
From: Alex Sierra
This case is used to migrate pages from device memory, back to system
memory. Device coherent type memory is cache coherent from device and CPU
point of view.
Signed-off-by: Alex Sierra
Acked-by: Felix Kuehling
Reviewed-by: Alistair Poppple
Signed-off-by: Christoph Hellwig
From: Alex Sierra
Avoid long term pinning for Coherent device type pages. This could
interfere with their own device memory manager. For now, we are just
returning error for PIN_LONGTERM Coherent device type pages. Eventually,
these type of pages will get migrated to system memory, once the
Split the code used to migrate to and from ZONE_DEVICE memory from
migrate.c into a new file.
Signed-off-by: Christoph Hellwig
---
mm/Kconfig | 3 +
mm/Makefile | 1 +
mm/migrate.c| 753 ---
mm/migrate_device.c | 765
This code will be used for device coherent memory as well in a bit,
so relax the ifdef a bit.
Signed-off-by: Christoph Hellwig
---
mm/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mm/Kconfig b/mm/Kconfig
index 6391d8d3a616f3..95d4aa3acaefe0 100644
--- a/mm/Kconfig
From: Alex Sierra
Device memory that is cache coherent from device and CPU point of view.
This is used on platforms that have an advanced system bus (like CAPI
or CXL). Any page of a process can be migrated to such memory. However,
no one should be allowed to pin such memory so that it can
Make the flow a little more clear and prepare for adding a new
ZONE_DEVICE memory type.
Signed-off-by: Christoph Hellwig
---
mm/migrate.c | 27 ---
1 file changed, 12 insertions(+), 15 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index
Make the flow a little more clear and prepare for adding a new
ZONE_DEVICE memory type.
Signed-off-by: Christoph Hellwig
---
mm/migrate.c | 31 +++
1 file changed, 15 insertions(+), 16 deletions(-)
diff --git a/mm/migrate.c b/mm/migrate.c
index
Remove up to two levels of indentation by using continue statements
and move variables to local scope where possible.
Signed-off-by: Christoph Hellwig
---
mm/gup.c | 81 ++--
1 file changed, 44 insertions(+), 37 deletions(-)
diff --git
Key off on the existence of ->page_free to prepare for adding support for
more pgmap types that are device managed and thus need the free callback.
Signed-off-by: Christoph Hellwig
---
mm/memremap.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mm/memremap.c
Add a depends on ZONE_DEVICE support or the s390-specific limited DAX
support, as one of the two is required at runtime for fsdax code to
actually work.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
---
fs/Kconfig | 1 +
1 file changed, 1
ZONE_DEVICE struct pages have an extra reference count that complicates
the code for put_page() and several places in the kernel that need to
check the reference count to see that a page is not being used (gup,
compaction, migration, etc.). Clean up the code so the reference count
doesn't need to
Move the check for the actual pgmap types that need the free at refcount
one behavior into the out of line helper, and thus avoid the need to
pull memremap.h into mm.h.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Dan Williams
Make put_devmap_managed_page return if it took charge of the page
or not and remove the separate page_is_devmap_managed helper.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Dan Williams
---
free_devmap_managed_page has nothing to do with the code in swap.c,
move it to live with the rest of the code for devmap handling.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Muchun Song
Reviewed-by:
__KERNEL__ ifdefs don't make sense outside of include/uapi/.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Muchun Song
Reviewed-by: Dan Williams
---
include/linux/mm.h | 4
1 file changed, 4
hmm.h pulls in the world for no good reason at all. Remove the
includes and push a few ones into the users instead.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Chaitanya Kulkarni
---
drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 1 +
memremap.c is only built when CONFIG_ZONE_DEVICE is set, so remove
the superflous extra check.
Signed-off-by: Christoph Hellwig
Reviewed-by: Logan Gunthorpe
Reviewed-by: Jason Gunthorpe
Reviewed-by: Chaitanya Kulkarni
Reviewed-by: Muchun Song
Reviewed-by: Dan Williams
---
mm/memremap.c | 3
Hi all,
this series removes the offset by one refcount for ZONE_DEVICE pages
that are freed back to the driver owning them, which is just device
private ones for now, but also the planned device coherent pages
and the ehanced p2p ones pending.
It does not address the fsdax pages yet, which will
On Thu, Feb 10, 2022 at 01:10:47PM +1100, Alistair Popple wrote:
> diff --git a/mm/gup.c b/mm/gup.c
> index cbb49abb7992..8e85c9fb8df4 100644
> --- a/mm/gup.c
> +++ b/mm/gup.c
> @@ -2007,7 +2007,6 @@ static long check_and_migrate_movable_pages(unsigned
> long nr_pages,
> if (!ret &&
On Thu, Feb 03, 2022 at 12:56:14AM -0800, Lucas De Marchi wrote:
Rename struct dma_buf_map to struct iosys_map and corresponding APIs.
Over time dma-buf-map grew up to more functionality than the one used by
dma-buf: in fact it's just a shim layer to abstract system memory, that
can be accessed
Hello Lucas,
On Wed, 2 Feb 2022 at 15:08, Lucas De Marchi wrote:
>
> On Wed, Feb 02, 2022 at 10:25:28AM +0100, Christian König wrote:
> >Am 02.02.22 um 10:11 schrieb Lucas De Marchi:
> >>[SNIP]
> >>diff --git a/MAINTAINERS b/MAINTAINERS
> >>index d03ad8da1f36..112676f11792 100644
> >>---
On Wed, Feb 02, 2022 at 11:20:16AM +0100, Thomas Zimmermann wrote:
Hi
Am 02.02.22 um 10:11 schrieb Lucas De Marchi:
diff --git a/Documentation/driver-api/dma-buf.rst
b/Documentation/driver-api/dma-buf.rst
index 2cd7db82d9fe..ea1e81894d7c 100644
--- a/Documentation/driver-api/dma-buf.rst
+++
The nouveau driver depends on include/linux/list.h instead of
nvif/list.h, so remove the obstacle-nvif/list.h.
Signed-off-by: Cai Huoqing
---
drivers/gpu/drm/nouveau/include/nvif/list.h | 353
1 file changed, 353 deletions(-)
delete mode 100644
On Wed, Feb 02, 2022 at 10:25:28AM +0100, Christian König wrote:
Am 02.02.22 um 10:11 schrieb Lucas De Marchi:
[SNIP]
diff --git a/MAINTAINERS b/MAINTAINERS
index d03ad8da1f36..112676f11792 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5675,7 +5675,6 @@ T:git
The nouveau KMS driver will call drm_plane_create_zpos_property() with
an init value depending on the plane purpose.
Since the initial value wasn't carried over in the state, the driver had
to set it again in nv50_wndw_reset(). However, the helpers have been
adjusted to set it properly at reset,
Rename struct dma_buf_map to struct iosys_map and corresponding APIs.
Over time dma-buf-map grew up to more functionality than the one used by
dma-buf: in fact it's just a shim layer to abstract system memory, that
can be accessed via regular load and store, from IO memory, that needs
to be
Rename struct dma_buf_map to struct iosys_map and corresponding APIs.
Over time dma-buf-map grew up to more functionality than the one used by
dma-buf: in fact it's just a shim layer to abstract system memory, that
can be accessed via regular load and store, from IO memory that needs to
be acessed
On Mon, Feb 7, 2022 at 2:42 PM Christoph Hellwig wrote:
>
> __KERNEL__ ifdefs don't make sense outside of include/uapi/.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Muchun Song
Thanks.
Rename struct dma_buf_map to struct iosys_map and corresponding APIs.
Over time dma-buf-map grew up to more functionality than the one used by
dma-buf: in fact it's just a shim layer to abstract system memory, that
can be accessed via regular load and store, from IO memory that needs to
be acessed
On Tue, Feb 01, 2022 at 08:46:15AM +0100, Christian König wrote:
Am 01.02.22 um 01:36 schrieb Lucas De Marchi:
On Fri, Jan 28, 2022 at 10:48:42AM +0100, Christian König wrote:
Am 28.01.22 um 10:40 schrieb Lucas De Marchi:
On Fri, Jan 28, 2022 at 10:22:00AM +0100, Christian König wrote:
Am
On Mon, Feb 7, 2022 at 2:42 PM Christoph Hellwig wrote:
>
> free_devmap_managed_page has nothing to do with the code in swap.c,
> move it to live with the rest of the code for devmap handling.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Muchun Song
Thanks.
On Thu, Feb 03, 2022 at 12:56:14AM -0800, Lucas De Marchi wrote:
> Rename struct dma_buf_map to struct iosys_map and corresponding APIs.
> Over time dma-buf-map grew up to more functionality than the one used by
> dma-buf: in fact it's just a shim layer to abstract system memory, that
> can be
On Mon, Feb 7, 2022 at 2:36 PM Christoph Hellwig wrote:
>
> memremap.c is only built when CONFIG_ZONE_DEVICE is set, so remove
> the superflous extra check.
>
> Signed-off-by: Christoph Hellwig
Reviewed-by: Muchun Song
Thanks.
On Fri, Jan 28, 2022 at 10:48:42AM +0100, Christian König wrote:
Am 28.01.22 um 10:40 schrieb Lucas De Marchi:
On Fri, Jan 28, 2022 at 10:22:00AM +0100, Christian König wrote:
Am 28.01.22 um 10:12 schrieb Lucas De Marchi:
On Fri, Jan 28, 2022 at 09:41:14AM +0100, Christian König wrote:
Rule
On Wed, Jan 26, 2022 at 01:39:44AM -0800, Lucas De Marchi wrote:
> Remove the local enabledisable() implementation and adopt the
> str_enable_disable() from linux/string_helpers.h.
>
> Signed-off-by: Lucas De Marchi
> Acked-by: Daniel Vetter
> Acked-by: Jani Nikula
There's an open-coded
On Wed, Jan 26, 2022 at 01:39:43AM -0800, Lucas De Marchi wrote:
> Remove the local yesno() implementation and adopt the str_yes_no() from
> linux/string_helpers.h.
>
> Signed-off-by: Lucas De Marchi
> Acked-by: Daniel Vetter
> Acked-by: Jani Nikula
Reviewed-by: Matt Roper
> ---
>
On Wed, Jan 26, 2022 at 01:39:46AM -0800, Lucas De Marchi wrote:
> Remove the local onoff() implementation and adopt the
> str_on_off() from linux/string_helpers.h.
>
> Signed-off-by: Lucas De Marchi
> Acked-by: Daniel Vetter
> Acked-by: Jani Nikula
Reviewed-by: Matt Roper
> ---
>
On Wed, Jan 26, 2022 at 01:39:45AM -0800, Lucas De Marchi wrote:
> Remove the local enableddisabled() implementation and adopt the
> str_enabled_disabled() from linux/string_helpers.h.
>
> Signed-off-by: Lucas De Marchi
> Acked-by: Daniel Vetter
> Acked-by: Jani Nikula
There's two open-coded
On Mon, Feb 07, 2022 at 04:19:29PM -0500, Felix Kuehling wrote:
>
> Am 2022-02-07 um 01:32 schrieb Christoph Hellwig:
>> Move the check for the actual pgmap types that need the free at refcount
>> one behavior into the out of line helper, and thus avoid the need to
>> pull memremap.h into mm.h.
>>
On Wed, Feb 09, 2022 at 02:53:51PM +0100, Christoph Hellwig wrote:
> On Wed, Feb 09, 2022 at 08:29:56AM -0400, Jason Gunthorpe wrote:
> > It is nice, but the other series are still impacted by the fsdax mess
> > - they still stuff pages into ptes without proper refcounts and have
> > to carry
On Wed, Feb 09, 2022 at 08:29:56AM -0400, Jason Gunthorpe wrote:
> It is nice, but the other series are still impacted by the fsdax mess
> - they still stuff pages into ptes without proper refcounts and have
> to carry nonsense to dance around this problem.
>
> I certainly would be unhappy if the
On Wed, Feb 09, 2022 at 07:23:45AM +0100, Christoph Hellwig wrote:
> On Tue, Feb 08, 2022 at 07:30:11PM -0800, Dan Williams wrote:
> > Interesting. I had expected that to really fix the refcount problem
> > that fs/dax.c would need to start taking real page references as pages
> > were added to a
52 matches
Mail list logo