From: Daniel Phillips
Add an ioctl to inquire memory available for allocation by libhsakmt
per node, allowing for space consumed by page translation tables.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 +
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c| 14 ++
drivers
Add a library call to inquire memory available for allocation per
node. Uses the AMDKFD_IOC_AVAILABLE_MEMORY ioctl available in KFD
ioctl version 1.7
Change-Id: Id770fc2261e9e076f2fbce7dcdac640a6354ddbe
---
include/hsakmt.h | 11 +++
include/linux/kfd_ioctl.h | 18 +++
Basic test for the new hsaKmtAvailableMemory library call. This is
a standalone test, does not modify any of the other tests just to
be on the safe side. More elaborate tests coming soon.
Change-Id: I738600d4b74cc5dba6b857e4c793f6b14b7d2283
Signed-off-by: Daniel Phillips
---
tests/kfdtest/src
/2022-January/073352.html
Signed-off-by: Daniel Phillips
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 +
.../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c| 14 ++
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c| 17 +
include/uapi/linux/kfd_ioctl.h
library call. This is
a standalone test, does not modify any of the other tests just to
be on the safe side. More elaborate tests coming soon.
Signed-off-by: Daniel Phillips
Change-Id: I645006a89bd8d55ef7b1605611e8ef0c010dad1a
---
tests/kfdtest/src/KFDMemoryTest.cpp | 20
1 file
On 2022-08-24 13:38, Felix Kuehling wrote:
> Do you mind squashing the two patches. It would make them easier to review
> because it makes it easier to see that the same functions are using both.
Will do.
Regards,
Daniel
more than or too much less than reported available.
Signed-off-by: Daniel Phillips
Change-Id: Ib418f0aa26e8db80590a6c5f2578da56a4b60f2b
---
tests/kfdtest/src/KFDMemoryTest.cpp | 17 +
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/tests/kfdtest/src
/linux/kfd_ioctl.h | 16 +---
4 files changed, 43 insertions(+), 3 deletions(-)
Signed-off-by: Daniel Phillips
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
index 4cb14c2fe53f..0a4c9187cba1 100644
--- a/drivers
Hi all,
This patch adds thunk support for the new KFD memory availability ioctl.
I am posting this patch inline with Thunderbird just for now, to establish
the principle that I can post patches/code old school style without
mangling whitespace. Please bear with me while I get that sorted out. I
w
Hi all,
This patch adds at unit test to thunk for the new KFD memory availability
ioctl.
KFDMemoryTest.cpp | 25 +
1 file changed, 25 insertions(+)
Regards,
Daniel
diff --git a/tests/kfdtest/src/KFDMemoryTest.cpp
b/tests/kfdtest/src/KFDMemoryTest.cpp
index f7ac73f..b
On 2022-03-22 11:20, Yat Sin, you wrote:
>> +CHECK_KFD_MINOR_VERSION(7);
>
> I think this should check for minor version 9 to match #define
> KFD_IOCTL_MINOR_VERSION 9 in kfd_ioctl.h
Right you are.
Regards,
Daniel
On 2022-03-22 11:20, Yat Sin, David wrote:
> I think this should check for minor version 9 to match #define
> KFD_IOCTL_MINOR_VERSION 9 in kfd_ioctl.h
Fixed.
include/hsakmt.h | 11 +++
include/linux/kfd_ioctl.h | 18 --
src/memory.c | 23
Rounding up allocations in the allocation path caused test regressions,
so now just round in the availability path.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
Rounding up allocations in the allocation path caused test regressions,
so now just round in the availability path.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
Seperately accumulate a statistic of rounded up allocations to use
to report availability, with a view to increasing the likelihood a
buffer object can be successfully allocated at exactly the size
reported by the availability API.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 +
driver
ned-off-by: Daniel Phillips
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 96
1 file changed, 32 insertions(+), 64 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 2b3d8bc8f0aa..bb5528c55b73 100644
--- a/d
Trivially changes kfd_lock_pdd_by_id ... mutex_unlock to use the
kfd_unlock_pdd helper.
Signed-off-by: Daniel Phillips
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 38 +++-
1 file changed, 18 insertions(+), 20 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd
ned-off-by: Daniel Phillips
Reviewed-by: Felix Kuehling
---
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 96
1 file changed, 32 insertions(+), 64 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
index 2b
Patch 1 adds kfd_lock_pdd_by_id and patch 2 adds kfd_unlock_pdd helpers,
broken out this way to reduce noise in the first patch, which is a bit
tricky because of modifying a lot of error paths. Patch 2 is trivial.
Daniel Phillips (2):
drm/amdgpu: Use kfd_lock_pdd_by_id helper in more places
Our assumptions about how much KFD memory is currently available for
allocation may be violated by various complexities so we define the
reported value as advisory, however we should never report negative
availability.
Signed-off-by: Daniel Phillips
---
drivers/gpu/drm/amd/amdgpu
Our assumptions about how much KFD memory is currently available for
allocation may be violated by various complexities so we define the
reported value as advisory, however we should never report negative
availability.
Signed-off-by: Daniel Phillips
---
drivers/gpu/drm/amd/amdgpu
pinned by kfd and add it back to kfd availability to
remove the double accounting.
Signed-off-by: Daniel Phillips
---
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h | 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 +++
2 files changed, 8 insertions(+)
diff --git a/drivers/gpu/drm
On 3/10/23 14:16, Felix Kuehling wrote:
> +static inline void kfd_flush_tlb(struct kfd_process_device *pdd,
>enum TLB_FLUSH_TYPE type)
Whitespace damage?
Regards,
Daniel
23 matches
Mail list logo