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?
