[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140214131705.GF28438@linutronix.de>
Date: Fri, 14 Feb 2014 14:17:05 +0100
From: Sebastian Andrzej Siewior <bigeasy@...utronix.de>
To: Nicholas Mc Guire <der.herr@...r.at>
Cc: linux-rt-users@...r.kernel.org,
LKML <linux-kernel@...r.kernel.org>,
Steven Rostedt <rostedt@...dmis.org>,
Peter Zijlstra <peterz@...radead.org>,
Carsten Emde <C.Emde@...dl.org>,
Thomas Gleixner <tglx@...utronix.de>,
Andreas Platschek <platschek@....tuwien.ac.at>
Subject: Re: [PATCH RT 4/5] allow preemption in
mem_cgroup_move_account_page_stat
* 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@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists