lkml.org 
[lkml]   [2011]   [Sep]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Jump Label initialization
From
Date
On Wed, 2011-09-28 at 19:14 -0700, Jeremy Fitzhardinge wrote:
> Hi all,
>
> I'm trying to use the jump label machinery as part of the pv ticketlock
> work I'm doing on x86.
>
> The problem I'm having at the moment is that I do my spinlock setup in
> smp_prepare_boot_cpu(), which happens before jump_label_init() gets
> called, and so the latter goes and nops out all my enabled jump label key.
>
> I'm experimenting at the moment with a patch to allow
> jump_label_enable() to be called fairly early, and have that be
> respected by jump_label_init(). I'm doing this by replacing
> arch_jump_label_poke_text_early() with
> arch_jump_label_transform_early(), which shares most of its code with
> its non-early variant, except that it expects to run in a pre-SMP
> environment.
>
> Does this seem plausible? (I haven't tested it yet.)
>
> The x86, mips and sparc patches are fairly simple; I forgot to look at
> powerpc, and I didn't fully investigate s390.

s390 does not have the early() variant since it didn't need it. On
pre-SMP we probably don't need stop_machine() so creating
arch_jump_label_transform_early() by leaving out stop_machine()
and patching the code directly should be fine.



\
 
 \ /
  Last update: 2011-09-29 14:07    [W:0.063 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site