From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755166AbbG1Fym (ORCPT ); Tue, 28 Jul 2015 01:54:42 -0400 Received: from e06smtp10.uk.ibm.com ([195.75.94.106]:54617 "EHLO e06smtp10.uk.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751472AbbG1Fyk (ORCPT ); Tue, 28 Jul 2015 01:54:40 -0400 X-Helo: d06dlp01.portsmouth.uk.ibm.com X-MailFrom: heiko.carstens@de.ibm.com X-RcptTo: linux-kernel@vger.kernel.org Date: Tue, 28 Jul 2015 07:54:34 +0200 From: Heiko Carstens To: Peter Zijlstra Cc: linux-kernel@vger.kernel.org, mingo@kernel.org, jasonbaron0@gmail.com, bp@alien8.de, luto@amacapital.net, tglx@linutronix.de, rostedt@goodmis.org, will.deacon@arm.com, liuj97@gmail.com, rabin@rab.in, ralf@linux-mips.org, ddaney@caviumnetworks.com, benh@kernel.crashing.org, michael@ellerman.id.au, davem@davemloft.net Subject: Re: [RFC][PATCH 5/7] jump_label: Rework update logic Message-ID: <20150728055434.GA4137@osiris> References: <20150724175209.814173117@infradead.org> <20150724175823.013936034@infradead.org> <20150727104714.GT19282@twins.programming.kicks-ass.net> <20150727163005.GP18673@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150727163005.GP18673@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-TM-AS-MML: disable X-Content-Scanned: Fidelis XPS MAILER x-cbid: 15072805-0041-0000-0000-0000051172EC Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 27, 2015 at 06:30:05PM +0200, Peter Zijlstra wrote: > On Mon, Jul 27, 2015 at 12:47:14PM +0200, Peter Zijlstra wrote: > > @@ -68,13 +63,8 @@ void static_key_slow_inc(struct static_k > > return; > > > > jump_label_lock(); > > + if (atomic_inc_and_test(&key->enabled)) > > atomic_inc_return() == 1, works _much_ better. Confirmed. With this change, the jump_label_init() patch, plus the changes in s390 inline asm everything works for me. There are a couple of places in s390 code where the DEFINE_STATIC_KEY_FALSE and static_branch_likely() combination would make sense.