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

From: Sebastian Andrzej Siewior
Date: Fri Feb 14 2014 - 08:17:16 EST


* Nicholas Mc Guire | 2014-02-10 16:39:33 [+0100]:

>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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/