From: "Christian König" <christian.koenig@amd.com>
To: "Tejun Heo" <tj@kernel.org>, "Michal Koutný" <mkoutny@suse.com>
Cc: Eric Chanudet <echanude@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
Andrew Morton <akpm@linux-foundation.org>,
Maarten Lankhorst <dev@lankhorst.se>,
Maxime Ripard <mripard@kernel.org>,
Natalie Vock <natalie.vock@gmx.de>,
Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
"T.J. Mercier" <tjmercier@google.com>,
Maxime Ripard <mripard@redhat.com>,
Albert Esteve <aesteve@redhat.com>,
Dave Airlie <airlied@gmail.com>,
linux-doc@vger.kernel.org
Subject: Re: [PATCH v2 2/2] cgroup/dmem: add dmem.memcg control file for double-charging to memcg
Date: Tue, 26 May 2026 09:48:09 +0200 [thread overview]
Message-ID: <5d1a20e5-49b7-4aa0-9473-c978f061b717@amd.com> (raw)
In-Reply-To: <ahCBrNfiLrh10Vtq@slm.duckdns.org>
On 5/22/26 18:17, Tejun Heo wrote:
> Hello,
>
> On Fri, May 22, 2026 at 05:26:16PM +0200, Michal Koutný wrote:
>> Hello Eric.
>>
>> On Tue, May 19, 2026 at 11:59:02AM -0400, Eric Chanudet <echanude@redhat.com> wrote:
>>> Add a root-only cgroupfs file "dmem.memcg" that lets an administrator
>>> configure whether allocations in a dmem region should also be charged to
>>> the memory controller.
>>
>> This kinda makes sense as it is not unlike io.cost.* device
>> configurators.
>>
>> Just for my better understanding -- will there be a space for userspace
>> to switch this? (No charged dmem allocations happen before responsible
>> userspace runs, so that the attribute remains unlocked.)
>>
>> (I'm rather indifferent about the actual double charging/non-charging
>> matter.)
>
> I wonder whether this would make more sense as a mount flag? What's the use
> case for e.g. having different config for different devices? Wouldn't that
> be really confusing?
From the cloud gaming use case I can't fully rule out that we need mixed settings for different cgroups.
Making an educated guess I think the best approach would be to have a default value per dmem given by the driver who creates that dmem.
Looking at AMD GPUs we have the APUs where VRAM is basically stolen system memory and dGPUs where VRAM is dedicated device memory. So what the driver detects as HW config should affect the default behavior.
Regards,
Christian.
>
> Thanks.
>
next prev parent reply other threads:[~2026-05-26 7:48 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-19 15:59 [PATCH v2 0/2] cgroup/dmem: allow double-charging dmem allocations " Eric Chanudet
2026-05-19 15:59 ` [PATCH v2 1/2] mm/memcontrol: add dmem charge/uncharge functions Eric Chanudet
2026-05-20 7:22 ` Albert Esteve
2026-05-22 15:53 ` Shakeel Butt
2026-05-22 15:55 ` Shakeel Butt
2026-05-26 7:40 ` Christian König
2026-05-27 19:10 ` Eric Chanudet
2026-05-29 14:52 ` Michal Koutný
2026-05-29 14:56 ` Michal Koutný
2026-05-19 15:59 ` [PATCH v2 2/2] cgroup/dmem: add dmem.memcg control file for double-charging to memcg Eric Chanudet
2026-05-22 15:26 ` Michal Koutný
2026-05-22 16:17 ` Tejun Heo
2026-05-26 7:48 ` Christian König [this message]
2026-05-26 16:59 ` Eric Chanudet
2026-06-05 11:27 ` Maarten Lankhorst
2026-06-05 15:42 ` Eric Chanudet
2026-06-05 15:53 ` Maarten Lankhorst
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=5d1a20e5-49b7-4aa0-9473-c978f061b717@amd.com \
--to=christian.koenig@amd.com \
--cc=aesteve@redhat.com \
--cc=airlied@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=corbet@lwn.net \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=echanude@redhat.com \
--cc=hannes@cmpxchg.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=mkoutny@suse.com \
--cc=mripard@kernel.org \
--cc=mripard@redhat.com \
--cc=muchun.song@linux.dev \
--cc=natalie.vock@gmx.de \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=skhan@linuxfoundation.org \
--cc=tj@kernel.org \
--cc=tjmercier@google.com \
/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
all inboxes | Powered by JetHome®