Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751477AbbEAQTX (ORCPT ); Fri, 1 May 2015 12:19:23 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:58954 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751341AbbEAQTU (ORCPT ); Fri, 1 May 2015 12:19:20 -0400 Date: Fri, 1 May 2015 18:18:53 +0200 From: Peter Zijlstra To: Linus Torvalds Cc: Ingo Molnar , "H. Peter Anvin" , Thomas Gleixner , Linux Kernel Mailing List , Borislav Petkov , Jakub Jelinek Subject: Re: [PATCH] x86: Optimize variable_test_bit() Message-ID: <20150501161853.GJ5029@twins.programming.kicks-ass.net> References: <20150501151630.GH5029@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1338 Lines: 28 On Fri, May 01, 2015 at 09:03:32AM -0700, Linus Torvalds wrote: > On Fri, May 1, 2015 at 8:16 AM, Peter Zijlstra wrote: > > PPS. Jakub, I see gcc5.1 still hasn't got output operands for asm goto; > > is this something we can get 'fixed' ? > > I suspect the problem is that now the particular register allocation > choices are basically not just around the asm, they'd affect the > target labels of the asm too. > > I think that for the kernel, it would *generally* be ok to just say > that the outputs are only valid in the case the asm does *not* branch > out, assuming that the *clobbers* obviously clobber things regardless. > Keeping the register allocation for the asm itself still purely > "local" to the asm. > > Something with a memory output we could just turn into a memory > clobber (so we could do the test-and-change bits today without using > any outputs - just mark memory clobbered). The risk is of course that we'll cause too much stores and reloads around them and regress instead of win. A single variable clobber might be a solution here ? -- 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/