On Thu, Jun 27, 2019 at 3:24 AM Daniel Vetter <daniel@xxxxxxxx> wrote: > Another question I have: What about HMM? With the device memory zone > the core mm will be a lot more involved in managing that, but I also > expect that we'll have classic buffer-based management for a long time > still. So these need to work together, and I fear slightly that we'll > have memcg and drmcg fighting over the same pieces a bit perhaps? > > Adding Jerome, maybe he has some thoughts on this. I just did a bit of digging and this looks like the current behaviour: https://www.kernel.org/doc/html/v5.1/vm/hmm.html#memory-cgroup-memcg-and-rss-accounting "For now device memory is accounted as any regular page in rss counters (either anonymous if device page is used for anonymous, file if device page is used for file backed page or shmem if device page is used for shared memory). This is a deliberate choice to keep existing applications, that might start using device memory without knowing about it, running unimpacted. A drawback is that the OOM killer might kill an application using a lot of device memory and not a lot of regular system memory and thus not freeing much system memory. We want to gather more real world experience on how applications and system react under memory pressure in the presence of device memory before deciding to account device memory differently." Regards, Kenny _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel