lkml.org 
[lkml]   [2023]   [Mar]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    SubjectRe: [RFC PATCH 4/7] memcg: sleep during flushing stats in safe contexts
    On Thu, Mar 23, 2023 at 04:00:34AM +0000, Yosry Ahmed wrote:
    > @@ -644,26 +644,26 @@ static void __mem_cgroup_flush_stats(void)
    > return;
    >
    > flush_next_time = jiffies_64 + 2*FLUSH_TIME;
    > - cgroup_rstat_flush(root_mem_cgroup->css.cgroup, false);
    > + cgroup_rstat_flush(root_mem_cgroup->css.cgroup, may_sleep);

    How is it safe to call this with may_sleep=true when it's holding the
    stats_flush_lock?

    > atomic_set(&stats_flush_threshold, 0);
    > spin_unlock(&stats_flush_lock);
    > }

    \
     
     \ /
      Last update: 2023-03-27 01:15    [W:3.718 / U:0.836 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site