cgroup/dmem: Select PAGE_COUNTER
Subsystems (5)
Maxime Ripard
maintainerPATCH 1/4 cgroup/dmem: Select PAGE_COUNTER
The dmem cgroup the page counting API implemented behing the PAGE_COUNTER kconfig option. However, it doesn't select it, resulting in potential build breakages. Select PAGE_COUNTER.
--- init/Kconfig | 1 + 1 file changed, 1 insertion(+)
init/Kconfig +1 -0
@@ -1137,10 +1137,11 @@ config CGROUP_RDMA Attaching processes with active RDMA resources to the cgroup hierarchy is allowed even if can cross the hierarchy's limit. config CGROUP_DMEM bool "Device memory controller (DMEM)" + select PAGE_COUNTER help The DMEM controller allows compatible devices to restrict device memory usage based on the cgroup hierarchy. As an example, it allows you to restrict VRAM usage for applications
Signature · 1 line
2.47.1
Maxime Ripard
maintainerPATCH 2/4 cgroup/dmem: Fix parameters documentation
During the dmem cgroup development, the parameters to the dmem_cgroup_state_evict_valuable() and dmem_cgroup_try_charge() were changed, but the documentation wasn't adjusted accordingly.
This results in a documentation build warning. Adjust the documentation to reflect what the final functions parameters are.
--- kernel/cgroup/dmem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
kernel/cgroup/dmem.c +2 -5
@@ -278,12 +278,10 @@ dmem_cgroup_calculate_protection(struct dmem_cgroup_pool_state *limit_pool,rcu_read_unlock (); }/** * dmem_cgroup_state_evict_valuable() - Check if we should evict from test_pool -* @dev: &dmem_cgroup_region -* @index: The index number of the region being tested. * @limit_pool: The pool for which we hit limits * @test_pool: The pool for which to test * @ignore_low: Whether we have to respect low watermarks. * @ret_hit_low: Pointer to whether it makes sense to consider low watermark. *
@@ -609,17 +607,16 @@ void dmem_cgroup_uncharge(struct dmem_cgroup_pool_state *pool, u64 size) }EXPORT_SYMBOL_GPL (dmem_cgroup_uncharge);/** * dmem_cgroup_try_charge() - Try charging a new allocation to a region. -* @dev: Device to charge +* @region: dmem region to charge * @size: Size (in bytes) to charge. * @ret_pool: On succesfull allocation, the pool that is charged. * @ret_limit_pool: On a failed allocation, the limiting pool. * -* This function charges the current pool for @dev with region at @index for a -* size of @size bytes. +* This function charges the @region region for a size of @size bytes. * * If the function succeeds, @ret_pool is set, which must be passed to * dmem_cgroup_uncharge() when undoing the allocation. * * When this function fails with -EAGAIN and @ret_limit_pool is non-null, it
Signature · 1 line
2.47.1
Maxime Ripard
maintainerPATCH 3/4 drm/doc: Include new drm-compute documentation
In reply to Maxime RipardCommit b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") introduced a new documentation file, but didn't link it anywhere. It was thus triggering a documentation build warning. Make sure it's included as part of the DRM documentation.
--- Documentation/gpu/index.rst | 1 + 1 file changed, 1 insertion(+)
Documentation/gpu/index.rst +1 -0
@@ -11,10 +11,11 @@ GPU Driver Developer's Guide drm-kms-helpers drm-uapi drm-usage-stats driver-uapi drm-client + drm-compute drivers backlight vga-switcheroo vgaarbiter automated_testing
Signature · 1 line
2.47.1
Maxime Ripard
maintainerPATCH 4/4 doc/cgroup: Fix title underline length
In reply to Maxime RipardCommit
Commit b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") introduced a new documentation file, with a shorter than expected underline. This results in a documentation build warning. Fix that underline length.
--- Documentation/core-api/cgroup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Documentation/core-api/cgroup.rst +1 -1
@@ -1,9 +1,9 @@ ================== Cgroup Kernel APIs ================== Device Memory Cgroup API (dmemcg) -========================= +================================= .. kernel-doc:: kernel/cgroup/dmem.c :export:
Signature · 1 line
2.47.1
Re: [PATCH 4/4] doc/cgroup: Fix title underline length
Quoted 11 lines · Maxime Ripard
Commit
Commit
b168ed458dde("kernel/cgroup: Add "dmem" memory accounting cgroup") introduced a new documentation file, with a shorter than expected underline. This results in a documentation build warning. Fix that underline length.Fixes b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")Reported-by Stephen Rothwell <[email protected]>Signed-off-by Maxime Ripard <[email protected]>
On the three doc patches:
Quoted 22 lines
--- Documentation/core-api/cgroup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)Documentation/core-api/cgroup.rst +1
-1@@ -1,9 +1,9 @@ ================== Cgroup Kernel APIs ================== Device Memory Cgroup API (dmemcg) -========================= +================================= .. kernel-doc:: kernel/cgroup/dmem.c :export:Signature · 1 line
2.47.1
Signature · 3 lines
Simona Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Quoted 8 lines · Maxime Ripard
The dmem cgroup the page counting API implemented behing the
PAGE_COUNTERkconfig option. However, it doesn't select it, resulting in potential build breakages. SelectPAGE_COUNTER.Fixes b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")Reported-by kernel test robot <[email protected]>Signed-off-by Maxime Ripard <[email protected]>
Quoted 23 lines
--- init/Kconfig | 1 + 1 file changed, 1 insertion(+)init/Kconfig +1
-0@@ -1137,10 +1137,11 @@ config CGROUP_RDMA Attaching processes with active RDMA resources to the cgroup hierarchy is allowed even if can cross the hierarchy's limit. config CGROUP_DMEM bool "Device memory controller (DMEM)" + select PAGE_COUNTER help The DMEM controller allows compatible devices to restrict device memory usage based on the cgroup hierarchy. As an example, it allows you to restrict VRAM usage for applicationsSignature · 1 line
2.47.1
Signature · 3 lines
Simona Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Maxime Ripard
maintainerQuoted 11 lines · Simona Vetter
Quoted 8 lines · Maxime Ripard
The dmem cgroup the page counting API implemented behing the
PAGE_COUNTERkconfig option. However, it doesn't select it, resulting in potential build breakages. SelectPAGE_COUNTER.Fixes b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")Reported-by kernel test robot <[email protected]>Signed-off-by Maxime Ripard <[email protected]>Reviewed-by Simona Vetter <[email protected]>
These patches have been pulled as a separate PR into drm-next, and I'm not sure how we should merge these patches.
Obviously, we'd need Tejun's, Johannes', or Michal's ack, but should we backmerged drm-next into drm-misc-next-fixes and apply them there?
Maxime
Quoted 11 lines · Maxime Ripard
Quoted 10 lines · Simona Vetter
Quoted 8 lines · Maxime Ripard
The dmem cgroup the page counting API implemented behing the
PAGE_COUNTERkconfig option. However, it doesn't select it, resulting in potential build breakages. SelectPAGE_COUNTER.Fixes b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")Reported-by kernel test robot <[email protected]>Signed-off-by Maxime Ripard <[email protected]>
Quoted 7 lines
Quoted 1 line
Reviewed-by Simona Vetter <[email protected]>These patches have been pulled as a separate PR into drm-next, and I'm not sure how we should merge these patches.
Obviously, we'd need Tejun's, Johannes', or Michal's ack, but should we backmerged drm-next into drm-misc-next-fixes and apply them there?
Please route them with the existing dmem patches.
Thanks.
Signature · 1 line
tejun
Quoted 5 lines · Maxime Ripard
The dmem cgroup the page counting API implemented behing the
PAGE_COUNTERkconfig option. However, it doesn't select it, resulting in potential build breakages. SelectPAGE_COUNTER.
Applied to misc/kernel.git (drm-misc-next-fixes).
Thanks!
Maxime