public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Can I use static keys from asm?
@ 2015-08-18  1:34 Andy Lutomirski
  2015-08-18  2:24 ` Peter Zijlstra
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Lutomirski @ 2015-08-18  1:34 UTC (permalink / raw)
  To: Peter Zijlstra, Frédéric Weisbecker, Borislav Petkov,
	linux-kernel@vger.kernel.org

I have the following silly problem:

For kernels with context tracking compiled in, we need to call the
context tracking hooks if context tracking is enabled.

There are four interesting cases:

1. Context tracking disabled in config.  This is easy to handle.

2. Context tracking enabled in config but completely disabled at
runtime.  Distros do this.  I want to nop out the context tracking
hooks.  We have a static_key for this, but half the hooks are in asm.

3. Context tracking enabled in config but disabled on the current CPU.
I don't care all that much.

4. Context tracking enabled for real.  Performance will suck.  I want
to fix that, and I think my cleanups will make it a lot easier, but
we're not there yet.

To unsuck case 2, static keys in asm would help.  Can I do that?  It
would be even better if I could do that in 4.3.

FWIW, this might be unnecessary in the long run.  As more of this
spaghetti moves into C, the need for static keys in asm will be
reduced :)

--Andy

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Can I use static keys from asm?
  2015-08-18  1:34 Can I use static keys from asm? Andy Lutomirski
@ 2015-08-18  2:24 ` Peter Zijlstra
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Zijlstra @ 2015-08-18  2:24 UTC (permalink / raw)
  To: Andy Lutomirski
  Cc: Frédéric Weisbecker, Borislav Petkov,
	linux-kernel@vger.kernel.org

On Mon, Aug 17, 2015 at 06:34:08PM -0700, Andy Lutomirski wrote:
> 2. Context tracking enabled in config but completely disabled at
> runtime.  Distros do this.  I want to nop out the context tracking
> hooks.  We have a static_key for this, but half the hooks are in asm.

> To unsuck case 2, static keys in asm would help.  Can I do that?  It
> would be even better if I could do that in 4.3.

I think Anton did a number of patches to enable static_key usage in asm
on PowerPC. x86 would need a bit of work but nothing makes it
fundamentally impossible.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-08-18  2:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18  1:34 Can I use static keys from asm? Andy Lutomirski
2015-08-18  2:24 ` Peter Zijlstra

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox