* [PATCH 2/4] cgroup/dmem: Fix parameters documentation
2025-01-13 9:26 [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Maxime Ripard
@ 2025-01-13 9:26 ` Maxime Ripard
2025-01-13 9:26 ` [PATCH 3/4] drm/doc: Include new drm-compute documentation Maxime Ripard
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2025-01-13 9:26 UTC (permalink / raw)
To: Jonathan Corbet, Tejun Heo, Johannes Weiner, Michal Koutný,
Simona Vetter, David Airlie
Cc: Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard, dri-devel,
linux-doc, cgroups, Stephen Rothwell
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.
Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/r/20250113160334.1f09f881@canb.auug.org.au/
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
kernel/cgroup/dmem.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/kernel/cgroup/dmem.c b/kernel/cgroup/dmem.c
index 52736ef0ccf2..ecea58abed6a 100644
--- a/kernel/cgroup/dmem.c
+++ b/kernel/cgroup/dmem.c
@@ -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
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 3/4] drm/doc: Include new drm-compute documentation
2025-01-13 9:26 [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Maxime Ripard
2025-01-13 9:26 ` [PATCH 2/4] cgroup/dmem: Fix parameters documentation Maxime Ripard
@ 2025-01-13 9:26 ` Maxime Ripard
2025-01-13 9:26 ` [PATCH 4/4] doc/cgroup: Fix title underline length Maxime Ripard
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2025-01-13 9:26 UTC (permalink / raw)
To: Jonathan Corbet, Tejun Heo, Johannes Weiner, Michal Koutný,
Simona Vetter, David Airlie
Cc: Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard, dri-devel,
linux-doc, cgroups, Stephen Rothwell
Commit 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.
Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/r/20250113155000.4a99e7b0@canb.auug.org.au/
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Documentation/gpu/index.rst | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst
index 37e383ccf73f..7dcb15850afd 100644
--- a/Documentation/gpu/index.rst
+++ b/Documentation/gpu/index.rst
@@ -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
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* [PATCH 4/4] doc/cgroup: Fix title underline length
2025-01-13 9:26 [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Maxime Ripard
2025-01-13 9:26 ` [PATCH 2/4] cgroup/dmem: Fix parameters documentation Maxime Ripard
2025-01-13 9:26 ` [PATCH 3/4] drm/doc: Include new drm-compute documentation Maxime Ripard
@ 2025-01-13 9:26 ` Maxime Ripard
2025-01-14 15:04 ` Simona Vetter
2025-01-14 14:53 ` [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Simona Vetter
2025-01-15 8:50 ` Maxime Ripard
4 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2025-01-13 9:26 UTC (permalink / raw)
To: Jonathan Corbet, Tejun Heo, Johannes Weiner, Michal Koutný,
Simona Vetter, David Airlie
Cc: Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard, dri-devel,
linux-doc, cgroups, Stephen Rothwell
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 <sfr@canb.auug.org.au>
Closes: https://lore.kernel.org/r/20250113154611.624256bf@canb.auug.org.au/
Signed-off-by: Maxime Ripard <mripard@kernel.org>
---
Documentation/core-api/cgroup.rst | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/core-api/cgroup.rst b/Documentation/core-api/cgroup.rst
index 8696e9513f51..734ea21e1e17 100644
--- a/Documentation/core-api/cgroup.rst
+++ b/Documentation/core-api/cgroup.rst
@@ -1,9 +1,9 @@
==================
Cgroup Kernel APIs
==================
Device Memory Cgroup API (dmemcg)
-=========================
+=================================
.. kernel-doc:: kernel/cgroup/dmem.c
:export:
--
2.47.1
^ permalink raw reply related [flat|nested] 9+ messages in thread* Re: [PATCH 4/4] doc/cgroup: Fix title underline length
2025-01-13 9:26 ` [PATCH 4/4] doc/cgroup: Fix title underline length Maxime Ripard
@ 2025-01-14 15:04 ` Simona Vetter
0 siblings, 0 replies; 9+ messages in thread
From: Simona Vetter @ 2025-01-14 15:04 UTC (permalink / raw)
To: Maxime Ripard
Cc: Jonathan Corbet, Tejun Heo, Johannes Weiner, Michal Koutný,
Simona Vetter, David Airlie, Maarten Lankhorst, Thomas Zimmermann,
dri-devel, linux-doc, cgroups, Stephen Rothwell
On Mon, Jan 13, 2025 at 10:26:08AM +0100, Maxime Ripard wrote:
> 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 <sfr@canb.auug.org.au>
> Closes: https://lore.kernel.org/r/20250113154611.624256bf@canb.auug.org.au/
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
On the three doc patches:
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
> ---
> Documentation/core-api/cgroup.rst | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/core-api/cgroup.rst b/Documentation/core-api/cgroup.rst
> index 8696e9513f51..734ea21e1e17 100644
> --- a/Documentation/core-api/cgroup.rst
> +++ b/Documentation/core-api/cgroup.rst
> @@ -1,9 +1,9 @@
> ==================
> Cgroup Kernel APIs
> ==================
>
> Device Memory Cgroup API (dmemcg)
> -=========================
> +=================================
> .. kernel-doc:: kernel/cgroup/dmem.c
> :export:
>
> --
> 2.47.1
>
--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER
2025-01-13 9:26 [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Maxime Ripard
` (2 preceding siblings ...)
2025-01-13 9:26 ` [PATCH 4/4] doc/cgroup: Fix title underline length Maxime Ripard
@ 2025-01-14 14:53 ` Simona Vetter
2025-01-14 15:02 ` Maxime Ripard
2025-01-15 8:50 ` Maxime Ripard
4 siblings, 1 reply; 9+ messages in thread
From: Simona Vetter @ 2025-01-14 14:53 UTC (permalink / raw)
To: Maxime Ripard
Cc: Jonathan Corbet, Tejun Heo, Johannes Weiner, Michal Koutný,
Simona Vetter, David Airlie, Maarten Lankhorst, Thomas Zimmermann,
dri-devel, linux-doc, cgroups, kernel test robot
On Mon, Jan 13, 2025 at 10:26:05AM +0100, Maxime Ripard wrote:
> 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.
>
> Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202501111330.3VuUx8vf-lkp@intel.com/
> Signed-off-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
> ---
> init/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/init/Kconfig b/init/Kconfig
> index 61f50cafa815..5e5328506138 100644
> --- a/init/Kconfig
> +++ b/init/Kconfig
> @@ -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
> --
> 2.47.1
>
--
Simona Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER
2025-01-14 14:53 ` [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Simona Vetter
@ 2025-01-14 15:02 ` Maxime Ripard
2025-01-14 20:45 ` Tejun Heo
0 siblings, 1 reply; 9+ messages in thread
From: Maxime Ripard @ 2025-01-14 15:02 UTC (permalink / raw)
To: Simona Vetter
Cc: Jonathan Corbet, Tejun Heo, Johannes Weiner, Michal Koutný,
David Airlie, Maarten Lankhorst, Thomas Zimmermann, dri-devel,
linux-doc, cgroups, kernel test robot
[-- Attachment #1: Type: text/plain, Size: 939 bytes --]
On Tue, Jan 14, 2025 at 03:53:23PM +0100, Simona Vetter wrote:
> On Mon, Jan 13, 2025 at 10:26:05AM +0100, Maxime Ripard wrote:
> > 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.
> >
> > Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
> > Reported-by: kernel test robot <lkp@intel.com>
> > Closes: https://lore.kernel.org/oe-kbuild-all/202501111330.3VuUx8vf-lkp@intel.com/
> > Signed-off-by: Maxime Ripard <mripard@kernel.org>
>
> Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER
2025-01-14 15:02 ` Maxime Ripard
@ 2025-01-14 20:45 ` Tejun Heo
0 siblings, 0 replies; 9+ messages in thread
From: Tejun Heo @ 2025-01-14 20:45 UTC (permalink / raw)
To: Maxime Ripard
Cc: Simona Vetter, Jonathan Corbet, Johannes Weiner,
Michal Koutný, David Airlie, Maarten Lankhorst,
Thomas Zimmermann, dri-devel, linux-doc, cgroups,
kernel test robot
On Tue, Jan 14, 2025 at 04:02:55PM +0100, Maxime Ripard wrote:
> On Tue, Jan 14, 2025 at 03:53:23PM +0100, Simona Vetter wrote:
> > On Mon, Jan 13, 2025 at 10:26:05AM +0100, Maxime Ripard wrote:
> > > 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.
> > >
> > > Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup")
> > > Reported-by: kernel test robot <lkp@intel.com>
> > > Closes: https://lore.kernel.org/oe-kbuild-all/202501111330.3VuUx8vf-lkp@intel.com/
> > > Signed-off-by: Maxime Ripard <mripard@kernel.org>
> >
> > Reviewed-by: Simona Vetter <simona.vetter@ffwll.ch>
>
> 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?
Acked-by: Tejun Heo <tj@kernel.org>
Please route them with the existing dmem patches.
Thanks.
--
tejun
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER
2025-01-13 9:26 [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Maxime Ripard
` (3 preceding siblings ...)
2025-01-14 14:53 ` [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Simona Vetter
@ 2025-01-15 8:50 ` Maxime Ripard
4 siblings, 0 replies; 9+ messages in thread
From: Maxime Ripard @ 2025-01-15 8:50 UTC (permalink / raw)
To: Jonathan Corbet, Tejun Heo, Johannes Weiner, Michal Koutný,
Simona Vetter, David Airlie, Maxime Ripard
Cc: Maarten Lankhorst, Thomas Zimmermann, dri-devel, linux-doc,
cgroups, kernel test robot
On Mon, 13 Jan 2025 10:26:05 +0100, Maxime Ripard wrote:
> 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.
>
>
Applied to misc/kernel.git (drm-misc-next-fixes).
Thanks!
Maxime
^ permalink raw reply [flat|nested] 9+ messages in thread