public inbox for drm-ai-reviews@public-inbox.freedesktop.org
 help / color / mirror / Atom feed
From: Qiliang Yuan <realwujing@gmail.com>
To: natalie.vock@gmx.de
Cc: dev@lankhorst.se, mripard@kernel.org, tj@kernel.org,
	hannes@cmpxchg.org, mkoutny@suse.com, cgroups@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cgroup/dmem: implement dmem.high soft limit and throttling
Date: Thu, 21 May 2026 19:28:12 +0800	[thread overview]
Message-ID: <20260521112813.62104-1-realwujing@gmail.com> (raw)
In-Reply-To: <c9eeee76-25a8-482e-9ef4-74971537457f@gmx.de>

Hi Natalie,

On Thu, May 21, 2026 at 10:52 AM Natalie Vock wrote:
> Interesting proposal, but inserting sleeps on allocation is never a good 
> idea and doesn't work like you might think it does. In graphics driver 
> land, lots of random things may result in buffer allocation functions 
> being called. 
[...]
> Your approach could lead to every single 
> submission sleeping for at least 100ms, thus permanently destroying 
> performance.

Thank you very much for the detailed explanation of the impact on TTM and 
Submit IOCTLs. You are absolutely right—injecting sleeps into the charge 
path, which is hit frequently during buffer validation and residency changes, 
would indeed be catastrophic for GPU performance.

> Maarten's suggestion of preferentially evicting memory that is over the 
> high limit sounds like a better approach.

I agree. Blocking the submission pipeline is not the right way to apply 
backpressure. I will abandon the current sleep-on-allocation approach and 
focus on implemented prioritized eviction as you and Maarten suggested. 
This ensures that reaching the "high" limit triggers a meaningful reclaim 
action rather than just stalling the GPU pipeline.

Best regards,
Qiliang

  reply	other threads:[~2026-05-22 14:41 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-20  6:07 [PATCH] cgroup/dmem: implement dmem.high soft limit and throttling Qiliang Yuan
2026-05-20  9:52 ` Tejun Heo
2026-05-21 11:28   ` Qiliang Yuan
2026-05-21  9:45 ` Maarten Lankhorst
2026-05-21 11:28   ` Qiliang Yuan
2026-05-21 10:52 ` Natalie Vock
2026-05-21 11:28   ` Qiliang Yuan [this message]
2026-05-25 12:14 ` Claude review: " Claude Code Review Bot
2026-05-25 12:14 ` Claude Code Review Bot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260521112813.62104-1-realwujing@gmail.com \
    --to=realwujing@gmail.com \
    --cc=cgroups@vger.kernel.org \
    --cc=dev@lankhorst.se \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mkoutny@suse.com \
    --cc=mripard@kernel.org \
    --cc=natalie.vock@gmx.de \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox