Skip to content
  • David Rientjes's avatar
    mm, vmpressure: pass-through notification support · b6bb9811
    David Rientjes authored
    By default, vmpressure events are not pass-through, i.e.  they propagate
    up through the memcg hierarchy until an event notifier is found for any
    threshold level.
    
    This presents a difficulty when a thread waiting on a read(2) for a
    vmpressure event cannot distinguish between local memory pressure and
    memory pressure in a descendant memcg, especially when that thread may
    not control the memcg hierarchy.
    
    Consider a user-controlled child memcg with a smaller limit than a
    top-level memcg controlled by the "Activity Manager" specified in
    Documentation/cgroup-v1/memory.txt.  It may register for memory pressure
    notification for descendant memcgs to make a policy decision: oom kill a
    low priority job, increase the limit, decrease other limits, etc.  If it
    registers for memory pressure notification on the top-level memcg, it
    currently cannot distinguish between memory pressure in its own memcg or
    a descendant memcg, which is user-controlled.
    
    Conversely, if a user ...
    b6bb9811