[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1109200955190.8056@router.home>
Date: Tue, 20 Sep 2011 09:57:32 -0500 (CDT)
From: Christoph Lameter <cl@...two.org>
To: Valdis.Kletnieks@...edu
cc: Steven Rostedt <rostedt@...dmis.org>, linux-kernel@...r.kernel.org,
Ingo Molnar <mingo@...hat.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Peter Zijlstra <peterz@...radead.org>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>
Subject: Re: [RFC][PATCH 0/5] Introduce checks for preemptable code for
this_cpu_read/write()
On Tue, 20 Sep 2011, Valdis.Kletnieks@...edu wrote:
> On Mon, 19 Sep 2011 23:06:17 EDT, Steven Rostedt said:
>
> > It is really confusing to know which version to use. I'm confused by the
> > this_cpu_*() compared with __this_cpu_*(). I'm guessing that most places
> > should use __this_cpu*(). But really this_cpu() should be the default,
> > and the places that can have it outside of preemption should have
> > another name. Maybe use the raw_this_cpu() or safe_this_cpu(), as there
> > is an irqsafe_this_cpu(). Maybe make a preemptsafe_cpu_*(). There should
> > only be a very few locations that are OK to have preemption enabled when
> > calling the this_cpu() code. Lets have those have the funny names and
> > not be the default "this_cpu_*()".
this_cpu_xx functions are made for those locations that have
preemption enabled. If you can use those function (classic case is a
per cpu counter increment in the network subsystem) then you can avoid
preempt disable/enable or get_cpu/put_cpu.
--
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