From: Jérôme Glisse
This update each existing invalidation to use the correct mmu notifier
event that represent what is happening to the CPU page table. See the
patch which introduced the events to see the rational behind this.
Signed-off-by: Jérôme Glisse
Cc: Andrew Morton
Cc: linux...@kvack.
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
Helper to test if a range is updated to read only (it is still valid
to read from the range). This is useful for device driver or anyone
who wish to optimize out update when they know that they already have
the range map read only.
Signed-off-by: Jérôme Glisse
Cc: Andrew Mor
From: Jérôme Glisse
Use the mmu_notifier_range_blockable() helper function instead of
directly dereferencing the range->blockable field. This is done to
make it easier to change the mmu_notifier range field.
This patch is the outcome of the following coccinelle patch:
%<
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
This patch introduce a set of enums that can be asso
From: Jérôme Glisse
Use an unsigned field for flags other than blockable and convert
the blockable field to be one of those flags.
Signed-off-by: Jérôme Glisse
Cc: Andrew Morton
Cc: linux...@kvack.org
Cc: Christian König
Cc: Joonas Lahtinen
Cc: Jani Nikula
Cc: Rodrigo Vivi
Cc: Jan Kara
Cc
From: Jérôme Glisse
(Andrew this apply on top of my HMM patchset as otherwise you will have
conflict with changes to mm/hmm.c)
Changes since v5:
- drop KVM bits waiting for KVM people to express interest if they
do not then i will post patchset to remove change_pte_notify as
wit
From: Jérôme Glisse
Simple helpers to test if range invalidation is blockable. Latter
patches use cocinnelle to convert all direct dereference of range->
blockable to use this function instead so that we can convert the
blockable field to an unsigned for more flags.
Signed-off-by: Jérôme Glisse
From: Jérôme Glisse
Empty chunk do not have a bo associated with them so no need to pin/unpin
on suspend/resume.
This fix suspend/resume on 5.1rc1 when NOUVEAU_SVM is enabled.
Signed-off-by: Jérôme Glisse
Reviewed-by: Tobias Klausmann
Tested-by: Tobias Klausmann
Cc: Ben Skeggs
Cc: dri-devel
From: Jérôme Glisse
When notifying change for a range use MMU_NOTIFIER_USE_CHANGE_PTE flag
for page table update that use set_pte_at_notify() and where the we are
going either from read and write to read only with same pfn or read only
to read and write with new pfn.
Note that set_pte_at_notify(
From: Jérôme Glisse
Helper to test if a range is updated to read only (it is still valid
to read from the range). This is useful for device driver or anyone
who wish to optimize out update when they know that they already have
the range map read only.
Signed-off-by: Jérôme Glisse
Cc: Christian
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
Use the mmu_notifier_range_blockable() helper function instead of
directly dereferencing the range->blockable field. This is done to
make it easier to change the mmu_notifier range field.
This patch is the outcome of the following coccinelle patch:
%<
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
This patch introduce a set of enums that can be asso
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
Since last version [4] i added the extra bits needed for the change_pte
optimization (which is a KSM thing). Here i am not posting users of
this, they will be posted to the appropriate sub-systems (KVM, GPU,
RDMA, ...) once this serie get upstream. If you want to look at users
From: Jérôme Glisse
This update each existing invalidation to use the correct mmu notifier
event that represent what is happening to the CPU page table. See the
patch which introduced the events to see the rational behind this.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Joonas Lahtin
From: Jérôme Glisse
Simple helpers to test if range invalidation is blockable. Latter
patches use cocinnelle to convert all direct dereference of range->
blockable to use this function instead so that we can convert the
blockable field to an unsigned for more flags.
Signed-off-by: Jérôme Glisse
From: Jérôme Glisse
Use an unsigned field for flags other than blockable and convert
the blockable field to be one of those flags.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Joonas Lahtinen
Cc: Jani Nikula
Cc: Rodrigo Vivi
Cc: Jan Kara
Cc: Andrea Arcangeli
Cc: Peter Xu
Cc: Feli
From: Jérôme Glisse
Signed-off-by: Jérôme Glisse
Cc: Logan Gunthorpe
Cc: Greg Kroah-Hartman
Cc: Rafael J. Wysocki
Cc: Bjorn Helgaas
Cc: Christian Koenig
Cc: Felix Kuehling
Cc: Jason Gunthorpe
Cc: linux-...@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: Christoph Hellwig
Cc: Mare
From: Jérôme Glisse
Allow mmap of device file to export device memory to peer to peer
devices. This will allow for instance a network device to access a
GPU memory or to access a storage device queue directly.
The common case will be a vma created by userspace device driver
that is then share to
From: Jérôme Glisse
Special device vma (mmap of a device file) can correspond to device
driver object that some device driver might want to share with other
device (giving access to). This add support for HMM to map those
special device vma if the owning device (exporter) allows it.
Signed-off-b
From: Jérôme Glisse
device_test_p2p() return true if two devices can peer to peer to
each other. We add a generic function as different inter-connect
can support peer to peer and we want to genericaly test this no
matter what the inter-connect might be. However this version only
support PCIE for
From: Jérôme Glisse
device_test_p2p() return true if two devices can peer to peer to
each other. We add a generic function as different inter-connect
can support peer to peer and we want to genericaly test this no
matter what the inter-connect might be. However this version only
support PCIE for
From: Jérôme Glisse
This patchset add support for peer to peer between device in two manner.
First for device memory use through HMM in process regular address space
(ie inside a regular vma that is not an mmap of device file or special
file). Second for special vma ie mmap of a device file, in t
From: Jérôme Glisse
When range of virtual address is updated read only and corresponding
user ptr object are already read only it is pointless to do anything.
Optimize this case out.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Jan Kara
Cc: Felix Kuehling
Cc: Jason Gunthorpe
Cc: And
From: Jérôme Glisse
When range of virtual address is updated read only and corresponding
user ptr object are already read only it is pointless to do anything.
Optimize this case out.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Jan Kara
Cc: Felix Kuehling
Cc: Jason Gunthorpe
Cc: And
From: Jérôme Glisse
When range of virtual address is updated read only and corresponding
user ptr object are already read only it is pointless to do anything.
Optimize this case out.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Jan Kara
Cc: Felix Kuehling
Cc: Jason Gunthorpe
Cc: And
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
Helper to test if a range is updated to read only (it is still valid
to read from the range). This is useful for device driver or anyone
who wish to optimize out update when they know that they already have
the range map read only.
Signed-off-by: Jérôme Glisse
Cc: Christian
From: Jérôme Glisse
When range of virtual address is updated read only and corresponding
user ptr object are already read only it is pointless to do anything.
Optimize this case out.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Jan Kara
Cc: Felix Kuehling
Cc: Jason Gunthorpe
Cc: And
From: Jérôme Glisse
This update each existing invalidation to use the correct mmu notifier
event that represent what is happening to the CPU page table. See the
patch which introduced the events to see the rational behind this.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Jan Kara
Cc:
From: Jérôme Glisse
Hi Andrew, i see that you still have my event patch in you queue [1].
This patchset replace that single patch and is broken down in further
step so that it is easier to review and ascertain that no mistake were
made during mechanical changes. Here are the step:
Patch 1 -
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
This patch introduce a set of enums that can be asso
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
To avoid having to change many call sites everytime we want to add a
parameter use a structure to group all parameters for the mmu_notifier
invalidate_range_start/end cakks. No functional changes with this
patch.
Changes since v2:
- fix build warning in migrate.c when CON
From: Jérôme Glisse
To avoid having to change many callback definition everytime we want
to add a parameter use a structure to group all parameters for the
mmu_notifier invalidate_range_start/end callback. No functional changes
with this patch.
Changed since v1:
- fix make htmldocs warning i
From: Jérôme Glisse
Changes since v2:
- fix build warning with CONFIG_MMU_NOTIFIER=n
- fix make htmldocs warning
Changes since v1:
- fix build with CONFIG_MMU_NOTIFIER=n
- kernel docs
Original cover letter:
This patchset add contextual information, why an invalidation is
happening, to mmu
From: Jérôme Glisse
The debugfs take reference on fence without dropping them.
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Daniel Vetter
Cc: Sumit Semwal
Cc: linux-me...@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
Cc: linaro-mm-...@lists.linaro.org
Cc: Stéphane Marchesin
Cc
From: Jérôme Glisse
The debugfs take reference on fence without dropping them. Also the
rcu section are not well balance. Fix all that ...
Changed since v1:
- moved fobj logic around to be rcu safe
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Daniel Vetter
Cc: Sumit Semwal
Cc: l
From: Jérôme Glisse
The debugfs take reference on fence without dropping them. Also the
rcu section are not well balance. Fix all that ...
Signed-off-by: Jérôme Glisse
Cc: Christian König
Cc: Daniel Vetter
Cc: Sumit Semwal
Cc: linux-me...@vger.kernel.org
Cc: dri-devel@lists.freedesktop.org
C
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
To avoid having to change many callback definition everytime we want
to add a parameter use a structure to group all parameters for the
mmu_notifier invalidate_range_start/end callback. No functional changes
with this patch.
Signed-off-by: Jérôme Glisse
Cc: Andrew Morton
Cc
From: Jérôme Glisse
To avoid having to change many call sites everytime we want to add a
parameter use a structure to group all parameters for the mmu_notifier
invalidate_range_start/end cakks. No functional changes with this
patch.
Changes since v1:
- introduce mmu_notifier_range_init() as
From: Jérôme Glisse
This patchset add contextual information, why an invalidation is
happening, to mmu notifier callback. This is necessary for user
of mmu notifier that wish to maintains their own data structure
without having to add new fields to struct vm_area_struct (vma).
For instance devic
From: Jérôme Glisse
CPU page table update can happens for many reasons, not only as a result
of a syscall (munmap(), mprotect(), mremap(), madvise(), ...) but also
as a result of kernel activities (memory compression, reclaim, migration,
...).
Users of mmu notifier API track changes to the CPU p
From: Jérôme Glisse
To avoid having to change many call sites everytime we want to add a
parameter use a structure to group all parameters for the mmu_notifier
invalidate_range_start/end cakks. No functional changes with this
patch.
Signed-off-by: Jérôme Glisse
Cc: Andrew Morton
Cc: Matthew Wi
From: Jérôme Glisse
To avoid having to change many callback definition everytime we want
to add a parameter use a structure to group all parameters for the
mmu_notifier invalidate_range_start/end callback. No functional changes
with this patch.
Signed-off-by: Jérôme Glisse
Cc: Andrew Morton
Cc
From: Jérôme Glisse
HMM provide a sets of helpers to avoid individual drivers re-doing
their own. This patch convert the radeon to use HMM mirror to track
CPU page table update and invalidate accordingly for userptr object.
Signed-off-by: Jérôme Glisse
Cc: dri-devel@lists.freedesktop.org
Cc: Al
From: Jérôme Glisse
This replace existing code that rely on get_user_page() aka GUP with
code that now use HMM mirror to mirror a range of virtual address as
a buffer object accessible by the GPU. There is no functional changes
from userspace point of view.
From kernel point of view we no longer
From: Jérôme Glisse
This replace existing code that rely on get_user_page() aka GUP with
code that now use HMM mirror to mirror a range of virtual address as
a buffer object accessible by the GPU. There is no functional changes
from userspace point of view.
From kernel point of view we no longer
From: Jérôme Glisse
[This depends on some HMM patchset queued upstream see branch [1]]
This is simple change to switch to use HMM for user ptr buffer object
which conveniently avoid to pin pages. I have more things in the pipe
to make HMM more usefull for such cases (like sharing more resources
From: Jérôme Glisse
[This depends on some HMM patchset queued upstream see branch [1]]
This is simple change to switch to use HMM for user ptr buffer object
which conveniently avoid to pin pages. I have more things in the pipe
to make HMM more usefull for such cases (like sharing more resources
From: Jérôme Glisse
HMM provide a sets of helpers to avoid individual drivers re-doing
their own. This patch convert the radeon to use HMM mirror to track
CPU page table update and invalidate accordingly for userptr object.
Signed-off-by: Jérôme Glisse
Cc: dri-devel@lists.freedesktop.org
Cc: Da
From: Jérôme Glisse
This ghost file have been haunting us.
Signed-off-by: Jérôme Glisse
---
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b. | 0
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 drivers/gpu/drm/nouveau/nvkm/subdev/mmu/gp10b.
diff --git a/drivers/gpu/drm/nouve
From: Jérôme Glisse
Signed-off-by: Jérôme Glisse
Cc: Ben Skeggs
---
drivers/gpu/drm/nouveau/include/nvif/if000c.h | 17
drivers/gpu/drm/nouveau/include/nvif/vmm.h| 2 +
drivers/gpu/drm/nouveau/include/nvkm/subdev/mmu.h | 25
drivers/gpu/drm/nouveau/nvif/vmm.c
From: Jérôme Glisse
HMM does not have any of the usual memory object properties. For HMM
inside any range the following is true:
- not all page in a range are valid
- not all page have same permission (read only, read and write)
- not all page are in same memory (system memory, GPU me
From: Jérôme Glisse
Allow userspace to create a virtual address range hole for GEM
object.
Signed-off-by: Jérôme Glisse
---
drivers/gpu/drm/nouveau/nouveau_ttm.c | 9 -
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_ttm.c
b/drivers/gpu/drm
From: Jérôme Glisse
Helpers to create area of virtual address under HMM control for a nouveau
client. GPU access to HMM area are valid as long as the hole vma exist in
the process virtual address space.
Signed-off-by: Jérôme Glisse
Cc: Ben Skeggs
---
drivers/gpu/drm/nouveau/nouveau_hmm.c | 28
From: Ben Skeggs
Signed-off-by: Ben Skeggs
---
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
b/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgp100.c
index 059fafe0e771..
From: Ben Skeggs
Signed-off-by: Ben Skeggs
---
drivers/gpu/drm/nouveau/include/nvif/class.h | 2 +
drivers/gpu/drm/nouveau/include/nvif/clb069.h | 8 ++
.../gpu/drm/nouveau/include/nvkm/engine/fault.h| 1 +
drivers/gpu/drm/nouveau/nvkm/engine/device/base.c | 6 +
drivers
From: Jérôme Glisse
User API to create HMM area.
Signed-off-by: Jérôme Glisse
Cc: Ben Skeggs
---
drivers/gpu/drm/nouveau/include/nvif/if000c.h | 9 +
drivers/gpu/drm/nouveau/include/nvif/vmm.h | 2 +
drivers/gpu/drm/nouveau/nvif/vmm.c | 51 ++
dr
From: Jérôme Glisse
SVM (Share Virtual Memory) through HMM (Heterogeneous Memory Management)
to nouveau client. SVM means that any valid pointer (private anonymous,
share memory or mmap of regular file) on the CPU is also valid on the
GPU. To achieve SVM with nouveau we use HMM kernel infrastruct
From: Jérôme Glisse
HMM area is a virtual address range under HMM control, GPU access inside
such range is like CPU access. For thing to work properly HMM range should
cover everything except a reserved range for GEM buffer object.
Signed-off-by: Jérôme Glisse
Cc: Ben Skeggs
---
drivers/gpu/d
From: Jérôme Glisse
This patch modify the page table iterator to support empty range when
unmaping a range (ie when it is not trying to populate the range).
Signed-off-by: Jérôme Glisse
Cc: Ben Skeggs
---
drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmm.c | 75 ++-
1 file c
From: Jérôme Glisse
Adds support for 64-bits read.
Signed-off-by: Jérôme Glisse
---
drivers/gpu/drm/nouveau/include/nvkm/core/memory.h | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/include/nvkm/core/memory.h
b/drivers/gpu/drm/nouveau/include/nvkm/core/mem
From: Ben Skeggs
Signed-off-by: Ben Skeggs
---
drivers/gpu/drm/nouveau/include/nvkm/core/device.h | 3 +++
drivers/gpu/drm/nouveau/include/nvkm/engine/fault.h | 4
drivers/gpu/drm/nouveau/nvkm/core/subdev.c | 1 +
drivers/gpu/drm/nouveau/nvkm/engine/Kbuild | 1 +
drivers
From: Jérôme Glisse
(mm is cced just to allow exposure of device driver work without ccing
a long list of peoples. I do not think there is anything usefull to
discuss from mm point of view but i might be wrong, so just for the
curious :)).
git://people.freedesktop.org/~glisse/linux branch: nouve
From: Ben Skeggs
Signed-off-by: Ben Skeggs
---
drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp100.c | 20 +++-
drivers/gpu/drm/nouveau/nvkm/subdev/mc/gp10b.c | 2 +-
drivers/gpu/drm/nouveau/nvkm/subdev/mc/priv.h | 2 ++
3 files changed, 22 insertions(+), 2 deletions(-)
diff --git
From: Jérôme Glisse
(Sorry for so many list cross-posting and big cc)
Changes since v1:
- remove more dead code in kvm (no testing impact)
- more accurate end address computation (patch 2)
in page_mkclean_one and try_to_unmap_one
- added tested-by/reviewed-by gotten so far
Tested as b
From: Jerome Glisse
Check if there is a big enough dp clock & enough dp lane to
drive the video mode provided.
Signed-off-by: Jerome Glisse
Cc:
---
drivers/gpu/drm/radeon/atombios_dp.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/radeon/atombios_
From: Jerome Glisse
Forbid allocating buffer bigger than visible VRAM or GTT, also
properly set lpfn field.
v2 - use max macro
- silence warning
v3 - don't explicitly set range limit
- use min macro
v4 - use max btw GTT & VRAM size
Cc: stable
Signed-off-by: Jerome Glisse
---
drivers/g
From: Jerome Glisse
Forbid allocating buffer bigger than visible VRAM or GTT, also
properly set lpfn field.
v2 - use max macro
- silence warning
v3 - don't explicitly set range limit
- use min macro
Cc: stable
Signed-off-by: Jerome Glisse
---
drivers/gpu/drm/radeon/radeon_object.c |
From: Jerome Glisse
Forbid allocating buffer bigger than visible VRAM or GTT, also
properly set lpfn field.
v2 - use max macro
- silence warning
Signed-off-by: Jerome Glisse
---
drivers/gpu/drm/radeon/radeon_object.c | 34 ++-
1 files changed, 28 insertions(+)
From: Jerome Glisse
Forbid allocating buffer bigger than visible VRAM or GTT, also
properly set lpfn field.
Signed-off-by: Jerome Glisse
---
drivers/gpu/drm/radeon/radeon_object.c | 36 ++-
1 files changed, 30 insertions(+), 6 deletions(-)
diff --git a/drivers/gp
From: Jerome Glisse
Forbid allocating buffer bigger than VRAM or GTT, also properly set
lpfn field of placement if VRAM is too small.
Signed-off-by: Jerome Glisse
---
drivers/gpu/drm/radeon/radeon.h|2 +-
drivers/gpu/drm/radeon/radeon_object.c | 19 ++-
drivers/gp
From: Jerome Glisse
GPU is prone to lockup if we deallocate shader bo right after
submitting command using the shader. Force shader cache flush
after each batch submission seems to fix the issue. It could
fix some of the lockup people were experiencing.
V2 move shader flush after pipeline flush
From: Jerome Glisse
GPU is prone to lockup if we deallocate shader bo right after
submitting command using the shader. Force shader cache flush
after each batch submission seems to fix the issue. It could
fix some of the lockup people were experiencing.
Signed-off-by: Jerome Glisse
---
drivers
From: Jerome Glisse
GTT/VRAM overlapping test had a typo which leaded to not
detecting case when vram_end > gtt_end. This patch fix the
logic and should fix #16574
cc: stable
Signed-off-by: Jerome Glisse
---
drivers/gpu/drm/radeon/radeon_device.c |2 +-
1 files changed, 1 insertions(+), 1
81 matches
Mail list logo