Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753694AbbGWOy4 (ORCPT ); Thu, 23 Jul 2015 10:54:56 -0400 Received: from smtprelay0068.hostedemail.com ([216.40.44.68]:51524 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752909AbbGWOyr (ORCPT ); Thu, 23 Jul 2015 10:54:47 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:966:973:981:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2196:2199:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3354:3622:3865:3866:3867:3868:3870:3871:3872:3873:3874:4321:4385:5007:6117:6119:6261:6742:7514:7875:7903:7974:8603:8666:10004:10400:10848:10967:11232:11658:11914:12296:12517:12519:12740:13069:13141:13146:13149:13151:13228:13230:13311:13357:14096:14097:21080,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0 X-HE-Tag: knee23_2979367f28224 X-Filterd-Recvd-Size: 3716 Date: Thu, 23 Jul 2015 10:54:43 -0400 From: Steven Rostedt To: Jason Baron Cc: Peter Zijlstra , Andy Lutomirski , Thomas Gleixner , Mikulas Patocka , Paul Mackerras , Arnaldo Carvalho de Melo , Kees Cook , Andrea Arcangeli , Vince Weaver , "hillf.zj" , Valdis Kletnieks , "linux-kernel@vger.kernel.org" , Borislav Petkov Subject: Re: Kernel broken on processors without performance counters Message-ID: <20150723105443.63ed742a@gandalf.local.home> In-Reply-To: <55AE79E4.5090600@gmail.com> References: <20150708160750.GQ19282@twins.programming.kicks-ass.net> <559D8250.8000707@gmail.com> <20150710141359.GJ19282@twins.programming.kicks-ass.net> <20150721082107.GE18673@twins.programming.kicks-ass.net> <20150721154959.GS19282@twins.programming.kicks-ass.net> <20150721161215.GU19282@twins.programming.kicks-ass.net> <55AE79E4.5090600@gmail.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.28; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1993 Lines: 46 On Tue, 21 Jul 2015 12:57:08 -0400 Jason Baron wrote: > On 07/21/2015 12:12 PM, Peter Zijlstra wrote: > > On Tue, Jul 21, 2015 at 08:51:51AM -0700, Andy Lutomirski wrote: > >> To clarify my (mis-)understanding: > >> > >> There are two degrees of freedom in a static_key. They can start out > >> true or false, and they can be unlikely or likely. Are those two > >> degrees of freedom in fact tied together? > > Yes, if you start out false, you must be unlikely. If you start out > > true, you must be likely. > > > > We could maybe try and untangle that if there really is a good use case, > > but this is the current state. > > We could potentially allow all combinations but it requires a more > complex implementation. Perhaps, by rewriting no-ops to jmps > during build-time? Steve Rostedt posted an implementation a while > back to do that, but in part it wasn't merged due to its > complexity and the fact that it increased the kernel text, which > I don't think we ever got to the bottom of. Steve was actually I think that happened because we didn't save enough with the nops to compensate for the code that it took to implement that change. Perhaps in the future that will be different as the implementation is a fixed size, while the usage of jump labels increase. -- Steve > trying to reduce the size of the no-ops by first letting the compiler > pick the 'jmp' instruction size (short jumps of only 2-bytes on > x86, instead of the hard-coded 5 bytes we currently have). > However, we could use the same idea here to allow the mixed > branch label and initial variable state. > > That said, it seems easy enough to reverse the direction of > the branch in an __init or so when we boot, if required. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/