Thread (5 messages) 5 messages, 2 authors, 2014-02-14

Re: [PATCH RT 4/5] allow preemption in mem_cgroup_move_account_page_stat

From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: 2014-02-14 13:17:09
Also in: lkml

* Nicholas Mc Guire | 2014-02-10 16:39:33 [+0100]:
quoted hunk ↗ jump to hunk
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();
}
Now, that I look at it again. Isn't it more efficient to keep preemption
disabled for this very short time instead instead of invoking
migrate_disable() which includes preempt_disable()/enable() and a few
more opcodes…
Therefore, I drop it again.

Sebastian
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help