[lkml]   [2011]   [Feb]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [patch 2/2] memcg: simplify the way memory limits are checked
    On Thu, 3 Feb 2011 13:56:11 +0100
    Johannes Weiner <> wrote:

    > Since transparent huge pages, checking whether memory cgroups are
    > below their limits is no longer enough, but the actual amount of
    > chargeable space is important.
    > To not have more than one limit-checking interface, replace
    > memory_cgroup_check_under_limit() and memory_cgroup_check_margin()
    > with a single memory_cgroup_margin() that returns the chargeable space
    > and leaves the comparison to the callsite.
    > Soft limits are now checked the other way round, by using the already
    > existing function that returns the amount by which soft limits are
    > exceeded: res_counter_soft_limit_excess().
    > Also remove all the corresponding functions on the res_counter side
    > that are now no longer used.
    > Signed-off-by: Johannes Weiner <>

    Acked-by: KAMEZAWA Hiroyuki <>

     \ /
      Last update: 2011-02-04 00:53    [W:0.020 / U:5.640 seconds]
    ©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site