[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1290652762.18088.4.camel@concordia>
Date: Thu, 25 Nov 2010 13:39:22 +1100
From: Michael Ellerman <michael@...erman.id.au>
To: Steven Rostedt <rostedt@...dmis.org>
Cc: Jason Baron <jbaron@...hat.com>,
Peter Zijlstra <peterz@...radead.org>, mingo@...e.hu,
mathieu.desnoyers@...ymtl.ca, hpa@...or.com, tglx@...utronix.de,
andi@...stfloor.org, roland@...hat.com, rth@...hat.com,
masami.hiramatsu.pt@...achi.com, fweisbec@...il.com,
avi@...hat.com, davem@...emloft.net, sam@...nborg.org,
ddaney@...iumnetworks.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/3] jump label: add enabled/disabled state to jump
label key entries
On Wed, 2010-11-24 at 10:53 -0500, Steven Rostedt wrote:
> On Wed, 2010-11-24 at 10:42 -0500, Jason Baron wrote:
>
> > > And I think the only arch where you can do text pokes without cross-cpu
> > > synchronization is one that doesn't have SMP support.
> > >
> > >
> >
> > is this really true?
> >
> > The powerpc implementation uses patch_instruction():
> >
> >
> > arch/powerpc/lib/code-patching.c:
> >
> > void patch_instruction(unsigned int *addr, unsigned int instr)
> > {
> > *addr = instr;
> > asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r"
> > (addr));
> > }
>
> Is this ever called outside of boot up? After SMP is enabled? (besides
> for creating trampolines, before they are used).
It is now :)
AFAIK it works fine, the icbi invalidates across all processors. The
only issue is that it's not precise, ie. another CPU might not see the
update immediately, but as soon as it takes an interrupt or something it
will.
What would suit us would be to have an arch callback that is called
after all the transforms for a particular jump label key have been made.
That way we could optimise the individual patches, and do a sync step at
the end, ie. when we want the effect of the patching to be globally
visible.
cheers
Download attachment "signature.asc" of type "application/pgp-signature" (199 bytes)
Powered by blists - more mailing lists