| 
         
xen-devel
[Xen-devel] Re: [PATCH RFC V2 3/5] jump_label: if a key has already been
 
| 
To:  | 
Jeremy Fitzhardinge <jeremy@xxxxxxxx> | 
 
| 
Subject:  | 
[Xen-devel] Re: [PATCH RFC V2 3/5] jump_label: if a key has already been initialized, don't nop it out | 
 
| 
From:  | 
Jason Baron <jbaron@xxxxxxxxxx> | 
 
| 
Date:  | 
Mon, 10 Oct 2011 16:10:28 -0400 | 
 
| 
Cc:  | 
Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>,	Jan Glauber <jang@xxxxxxxxxxxxxxxxxx>,	the arch/x86 maintainers <x86@xxxxxxxxxx>,	David Daney <david.daney@xxxxxxxxxx>,	Linux Kernel Mailing List <linux-kernel@xxxxxxxxxxxxxxx>,	Steven Rostedt <rostedt@xxxxxxxxxxx>,	Michael Ellerman <michael@xxxxxxxxxxxxxx>,	Jeremy Fitzhardinge <jeremy.fitzhardinge@xxxxxxxxxx>,	"David S. Miller" <davem@xxxxxxxxxxxxx> | 
 
| 
Delivery-date:  | 
Mon, 10 Oct 2011 13:15:33 -0700 | 
 
| 
Envelope-to:  | 
www-data@xxxxxxxxxxxxxxxxxxx | 
 
| 
In-reply-to:  | 
<4E934E5B.3000603@xxxxxxxx> | 
 
| 
List-help:  | 
<mailto:xen-devel-request@lists.xensource.com?subject=help> | 
 
| 
List-id:  | 
Xen developer discussion <xen-devel.lists.xensource.com> | 
 
| 
List-post:  | 
<mailto:xen-devel@lists.xensource.com> | 
 
| 
List-subscribe:  | 
<http://lists.xensource.com/mailman/listinfo/xen-devel>,	<mailto:xen-devel-request@lists.xensource.com?subject=subscribe> | 
 
| 
List-unsubscribe:  | 
<http://lists.xensource.com/mailman/listinfo/xen-devel>,	<mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe> | 
 
| 
References:  | 
<cover.1317506051.git.jeremy.fitzhardinge@xxxxxxxxxx>	<477dead9647029012f93c651f2892ed0e86b89e7.1317506051.git.jeremy.fitzhardinge@xxxxxxxxxx>	<20111010153631.GA2413@xxxxxxxxxx> <4E934E5B.3000603@xxxxxxxx> | 
 
| 
Sender:  | 
xen-devel-bounces@xxxxxxxxxxxxxxxxxxx | 
 
| 
User-agent:  | 
Mutt/1.5.20 (2009-12-10) | 
 
 
 
On Mon, Oct 10, 2011 at 12:58:19PM -0700, Jeremy Fitzhardinge wrote:
> > Hi,
> >
> > I just realized that the early call to jump_label_inc(), isn't being
> > honored with this patch until later when we invoke jump_label_init().
> > That strikes me as being inconsistent. When jump_label_inc() returns we
> > should expect the branch to be updated.
> 
> Why is that?  It looks to me like it will unconditionally update the
> instruction, irrespective of whether _init() has been called?
> 
No. jump_label_init(), sets up key->entries, to point into the jump
table...before that jump_label_update(), doesn't know where the table is
located, and will just return, without doing the update.
> > Thus, I think what probably want is to add a new 'int jump_label_init'
> > flag. If its not set we can call 'jump_label_init()' from
> > jump_label_inc()/dec().
> 
> Hm.  I worry that it may end up calling jump_label_init() in an
> unexpected context, especially since it may well be config-dependent, or
> adding a jump_label_inc() later on starts mysteriously failing.
good point.
> 
> >  And jump_label_init() can avoid initialization
> > if its already set.
> 
> That doesn't seem worthwhile in itself.  I suspect the number of "early"
> jump_label_incs will be very small (or we should look at doing the init
> earlier).
> 
>     J
I have it as 'early_initcall()', but perhaps it should be moved into
init/main.c. I don't think there's any reason it can't be done super
early. So I think this might be the best answer. It will also simplify
your series.
Thanks,
-Jason
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
 
 |   
 
 | 
    |