lkml.org 
[lkml]   [2011]   [Sep]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH 3/5] memcg: Disable preemption in memcg_check_events()
On Mon, Sep 19, 2011 at 05:20:43PM -0400, Steven Rostedt wrote:
> From: Steven Rostedt <srostedt@redhat.com>
>
> The code in memcg_check_events() calls this_cpu_read() on
> different variables without disabling preemption, and can cause
> the calculations to be done from two different CPU variables.
>
> Disable preemption throughout the check to keep apples and oranges
> from becoming a mixed drink.

Makes sense, thanks!

Since the atomic versions are no longer required with preemption
disabled explicitely, could you also make the this_cpu ops in
__memcg_event_check and __mem_cgroup_target_update non-atomic in the
same go?


\
 
 \ /
  Last update: 2011-09-20 16:23    [W:1.887 / U:0.044 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site