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.

Reply via email to