All of lore.kernel.org
 help / color / mirror / Atom feed
* list_lru operation for new child memcg?
@ 2025-05-26 20:32 Dave Airlie
  2025-05-26 22:08 ` Dave Chinner
  0 siblings, 1 reply; 8+ messages in thread
From: Dave Airlie @ 2025-05-26 20:32 UTC (permalink / raw)
  To: Dave Chinner, Johannes Weiner, dri-devel, Koenig, Christian,
	kasong, nphamcs

Hey all,

Hope someone here can help me work this out, I've been studying
list_lru a bit this week for possible use in the GPU driver memory
pool code.

I understand that when a cgroup goes away, it's lru resources get
reparented into the parent resource, however I'm wondering about
operation in the opposite direction and whether this is possible or
something we'd like to add.

Scenario:
1. Toplevel cgroup - empty LRU
2. Child cgroup A created, adds a bunch of special pages to the LRU
3. Child cgroup A dies, pages in lru list get reparented to toplevel cgroup
4. Child cgroup B created. Now if B wants to get special pages from
the pool, is it possible for B to get access to the LRU from the
toplevel cgroup automatically? Ideally B would takes pages from the
parent LRU, and put them back into it's LRU, and then reuse the ones
from it's LRU, and only finally allocate new special pages once it has
none and the parent cgroup has none as well.

I'm just not seeing where the code for 4 happens, but I'm not fully
across this all yet either,

Thanks,
Dave.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2025-06-02  8:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-26 20:32 list_lru operation for new child memcg? Dave Airlie
2025-05-26 22:08 ` Dave Chinner
2025-05-26 22:30   ` Dave Airlie
2025-05-26 23:49     ` Dave Chinner
2025-05-28  7:20       ` Christian König
2025-05-28 21:53         ` Dave Airlie
2025-05-28 23:20           ` Dave Chinner
2025-06-02  8:20             ` Christian König

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.