* [PULL] dmem cgroup, v2
@ 2025-01-10 9:02 Maxime Ripard
0 siblings, 0 replies; only message in thread
From: Maxime Ripard @ 2025-01-10 9:02 UTC (permalink / raw)
To: Simona Vetter, David Airlie
Cc: Maarten Lankhorst, Thomas Zimmermann, Maxime Ripard, dri-devel,
Tejun Heo, Johannes Weiner, Michal Koutný, cgroups
[-- Attachment #1: Type: text/plain, Size: 3293 bytes --]
Hi,
Here's a drm-next PR for the new "dmem" cgroup Maarten and I worked on.
Given that it's only user for now is DRM, Tejun agreed to merge it
through DRM.
This is based on the series sent by Maarten here:
https://lore.kernel.org/all/20241204134410.1161769-1-dev@lankhorst.se/
The three last patches are not part of it, for different reasons:
- patch 5: we haven't had the acks from the amdgpu maintainers
- patch 6: I didn't feel comfortable merging a patch defined as a "hack"
- patch 7: it's not clear yet how GEM is going to be supported, so we
need to have further discussion on this one.
This new version was asked by Dave to fix a warning introduced by an
uninitialized variable, which has been addressed.
Thanks!
Maxime
The following changes since commit 9d89551994a430b50c4fffcb1e617a057fa76e20:
Linux 6.13-rc6 (2025-01-05 14:13:40 -0800)
are available in the Git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git tags/cgroup-dmem-drm-v2
for you to fetch changes up to dfe6aa163c3b3780add4392d93b686b399ceb591:
drm/xe: Implement cgroup for vram (2025-01-10 09:54:50 +0100)
----------------------------------------------------------------
DMEM cgroup pull request
This introduces a new cgroup controller to limit the device memory.
Notable users would be DRM, dma-buf heaps, or v4l2.
This pull request is based on the series developped by Maarten
Lankhorst, Friedrich Vock, and I:
https://lore.kernel.org/all/20241204134410.1161769-1-dev@lankhorst.se/
----------------------------------------------------------------
Maarten Lankhorst (3):
kernel/cgroup: Add "dmem" memory accounting cgroup
drm/ttm: Handle cgroup based eviction in TTM
drm/xe: Implement cgroup for vram
Maxime Ripard (1):
drm/drv: Add drmm managed registration helper for dmem cgroups.
Documentation/admin-guide/cgroup-v2.rst | 58 +-
Documentation/core-api/cgroup.rst | 9 +
Documentation/core-api/index.rst | 1 +
Documentation/gpu/drm-compute.rst | 54 ++
drivers/gpu/drm/drm_drv.c | 32 +
drivers/gpu/drm/ttm/tests/ttm_bo_test.c | 18 +-
drivers/gpu/drm/ttm/tests/ttm_bo_validate_test.c | 4 +-
drivers/gpu/drm/ttm/tests/ttm_resource_test.c | 2 +-
drivers/gpu/drm/ttm/ttm_bo.c | 52 +-
drivers/gpu/drm/ttm/ttm_resource.c | 23 +-
drivers/gpu/drm/xe/xe_ttm_vram_mgr.c | 8 +
include/drm/drm_drv.h | 5 +
include/drm/ttm/ttm_resource.h | 12 +-
include/linux/cgroup_dmem.h | 66 ++
include/linux/cgroup_subsys.h | 4 +
include/linux/page_counter.h | 2 +-
init/Kconfig | 10 +
kernel/cgroup/Makefile | 1 +
kernel/cgroup/dmem.c | 861 +++++++++++++++++++++++
mm/page_counter.c | 4 +-
20 files changed, 1194 insertions(+), 32 deletions(-)
create mode 100644 Documentation/core-api/cgroup.rst
create mode 100644 Documentation/gpu/drm-compute.rst
create mode 100644 include/linux/cgroup_dmem.h
create mode 100644 kernel/cgroup/dmem.c
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 273 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-01-10 9:02 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-10 9:02 [PULL] dmem cgroup, v2 Maxime Ripard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox