lkml.org 
[lkml]   [2014]   [Feb]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH RT 4/5] allow preemption in mem_cgroup_move_account_page_stat

allow preemption in mem_cgroup_move_account_page_stat

as the call sites of mem_cgroup_move_account_page_stat are under
move_lock_mem_cgroup move_unlock_mem_cgroup (spin_lock_irqsave/
spin_unlock_irqrestore respectively) the move operations
preempt_disable/enable seem to be purely for migration protection so
a migrate_disable/enable should be fine here.

patch on top of 3.12.10-rt15

Signed-off-by: Nicholas Mc Guire <der.herr@hofr.at>
---
mm/memcontrol.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index a67e630f..e7cc35a 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3784,10 +3784,10 @@ void mem_cgroup_move_account_page_stat(struct mem_cgroup *from,
enum mem_cgroup_stat_index idx)
{
/* Update stat data for mem_cgroup */
- preempt_disable();
+ migrate_disable();
__this_cpu_sub(from->stat->count[idx], nr_pages);
__this_cpu_add(to->stat->count[idx], nr_pages);
- preempt_enable();
+ migrate_enable();
}

/**
--
1.7.2.5


\
 
 \ /
  Last update: 2014-02-10 17:01    [W:0.228 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site