Skip to content

drm/xe: dma-buf Add VRAM pin limit for backports when dmem_cgroup is not present - #514

Merged
pravalikagurram1 merged 1 commit into
intel-gpu:oot-backport/mainfrom
pravalikagurram1:vram_pinning
Aug 28, 2026
Merged

drm/xe: dma-buf Add VRAM pin limit for backports when dmem_cgroup is not present#514
pravalikagurram1 merged 1 commit into
intel-gpu:oot-backport/mainfrom
pravalikagurram1:vram_pinning

Conversation

@pravalikagurram1

Copy link
Copy Markdown

Remove the dummy drmm_cgroup_register_region() stub from the backport
header and replace it with a driver-level VRAM pin accounting and
enforcement mechanism for kernels where dmem_cgroup is not available.

The dmem_cgroup subsystem, introduced in
newer kernels, provides per-cgroup limits on device memory usage such
as GPU VRAM. On older backport target kernels this subsystem is absent
(BPM_DRMM_CGROUP_REGISTER_REGION_NOT_PRESENT), so no VRAM pinning
limits were enforced — external dma-buf consumers could pin an
unbounded amount of VRAM, potentially starving the GPU driver and
local workloads.

The VRAM pin percentage is configurable via the module parameter:
xe.pin_vram_percent=<0-100> (default: 50)
A value of 0 disables the limit (unlimited pinning).

Signed-off-by: Pravalika Gurram pravalika.gurram@intel.com

From 9adf8d7f4ca55cffdbe2cc58a023d2dae6c98cb0 Mon Sep 17 00:00:00 2001
From: Himal Prasad Ghimiray <himal.prasad.ghimiray@intel.com>
Date: Mon, 3 Aug 2026 10:40:35 +0530
Subject: [PATCH 7/8] drm/xe/vram: show pinned vram in debug

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove [Patch]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about validation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

validation kunit is not supported . Till igt comes

…not present

Remove the dummy drmm_cgroup_register_region() stub from the backport
header and replace it with a driver-level VRAM pin accounting and
enforcement mechanism for kernels where dmem_cgroup is not available.

The dmem_cgroup subsystem, introduced in
newer kernels, provides per-cgroup limits on device memory usage such
as GPU VRAM. On older backport target kernels this subsystem is absent
(BPM_DRMM_CGROUP_REGISTER_REGION_NOT_PRESENT), so no VRAM pinning
limits were enforced — external dma-buf consumers could pin an
unbounded amount of VRAM, potentially starving the GPU driver and
local workloads.

The VRAM pin percentage is configurable via the module parameter:
  xe.pin_vram_percent=<0-100>  (default: 50)
A value of 0 disables the limit (unlimited pinning).

Signed-off-by: Pravalika Gurram <pravalika.gurram@intel.com>
@pravalikagurram1
pravalikagurram1 merged commit b5e7310 into intel-gpu:oot-backport/main Aug 28, 2026
@pravalikagurram1
pravalikagurram1 deleted the vram_pinning branch August 28, 2026 09:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants