linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeel.butt@linux.dev>
To: "Christian König" <christian.koenig@amd.com>
Cc: Dave Airlie <airlied@gmail.com>,
	Maxime Ripard <mripard@redhat.com>,
	 "T.J. Mercier" <tjmercier@google.com>,
	Eric Chanudet <echanude@redhat.com>,
	 Sumit Semwal <sumit.semwal@linaro.org>,
	Benjamin Gaignard <benjamin.gaignard@collabora.com>,
	 Brian Starkey <Brian.Starkey@arm.com>,
	John Stultz <jstultz@google.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	David Hildenbrand <david@kernel.org>,
	 Lorenzo Stoakes <lorenzo.stoakes@oracle.com>,
	"Liam R. Howlett" <Liam.Howlett@oracle.com>,
	 Vlastimil Babka <vbabka@suse.cz>,
	Mike Rapoport <rppt@kernel.org>,
	 Suren Baghdasaryan <surenb@google.com>,
	Michal Hocko <mhocko@suse.com>,
	linux-media@vger.kernel.org,  dri-devel@lists.freedesktop.org,
	linaro-mm-sig@lists.linaro.org, linux-kernel@vger.kernel.org,
	 Albert Esteve <aesteve@redhat.com>,
	linux-mm@kvack.org, Yosry Ahmed <yosryahmed@google.com>
Subject: Re: [PATCH v2 0/3] dma-buf: heaps: cma: enable dmem cgroup accounting
Date: Thu, 26 Feb 2026 05:45:30 -0800	[thread overview]
Message-ID: <aaBNYqv2xJ4QEyh4@linux.dev> (raw)
In-Reply-To: <d1b287c9-46ff-4345-a410-7e1cfefb5c66@amd.com>

On Thu, Feb 26, 2026 at 12:32:42PM +0100, Christian König wrote:
> On 2/26/26 00:43, Dave Airlie wrote:
> >>>>
> 
> > If something is in the main memory pool, it should be accounted for
> > using memcg. You cannot remove memory from the main memory pool
> > without accounting for it.
> 
> That's what I'm strongly disagreeing on. See the page cache is not accounted to memcg either, so when you open a file and the kernel caches the backing pages that doesn't reduce the amount you can allocate through malloc, doesn't it?

Page cache is accounted/charged to memcg and usually it is reclaimable meaning
it most probably doesn't reduce the amount of anon memory you can allocate.

> 
> For dGPUs GTT is basically just the fallback when you over allocate local memory (plus a few things for uploads).
> 
> In other words system memory becomes the swap of device local memory. Just think about why memcg doesn't limits swap but only how much is swapped out.

What does "memcg doesn't limits swap" mean?



  reply	other threads:[~2026-02-26 13:45 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-18 17:14 Eric Chanudet
2026-02-18 17:14 ` [PATCH v2 1/3] cma: Register dmem region for each cma region Eric Chanudet
2026-02-18 17:14 ` [PATCH v2 2/3] cma: Provide accessor to cma dmem region Eric Chanudet
2026-02-18 17:14 ` [PATCH v2 3/3] dma-buf: heaps: cma: charge each cma heap's dmem Eric Chanudet
2026-02-19  7:17   ` Christian König
2026-02-19 17:10     ` Eric Chanudet
2026-02-20  8:16       ` Christian König
2026-02-23 16:14         ` Eric Chanudet
2026-02-19  9:16   ` Maxime Ripard
2026-02-19 17:21     ` Eric Chanudet
2026-02-19  9:45 ` [PATCH v2 0/3] dma-buf: heaps: cma: enable dmem cgroup accounting Albert Esteve
2026-02-20  1:14 ` T.J. Mercier
2026-02-20  9:45   ` Christian König
2026-02-23 19:39     ` Eric Chanudet
2026-02-24  9:43     ` Maxime Ripard
2026-02-24 10:32       ` Christian König
2026-02-25 23:43         ` Dave Airlie
2026-02-26 11:32           ` Christian König
2026-02-26 13:45             ` Shakeel Butt [this message]
2026-02-24  9:42   ` Maxime Ripard

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=aaBNYqv2xJ4QEyh4@linux.dev \
    --to=shakeel.butt@linux.dev \
    --cc=Brian.Starkey@arm.com \
    --cc=Liam.Howlett@oracle.com \
    --cc=aesteve@redhat.com \
    --cc=airlied@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=benjamin.gaignard@collabora.com \
    --cc=christian.koenig@amd.com \
    --cc=david@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=echanude@redhat.com \
    --cc=jstultz@google.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lorenzo.stoakes@oracle.com \
    --cc=mhocko@suse.com \
    --cc=mripard@redhat.com \
    --cc=rppt@kernel.org \
    --cc=sumit.semwal@linaro.org \
    --cc=surenb@google.com \
    --cc=tjmercier@google.com \
    --cc=vbabka@suse.cz \
    --cc=yosryahmed@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