From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758210AbbFCQjP (ORCPT ); Wed, 3 Jun 2015 12:39:15 -0400 Received: from relay4-d.mail.gandi.net ([217.70.183.196]:57972 "EHLO relay4-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754151AbbFCQjH (ORCPT ); Wed, 3 Jun 2015 12:39:07 -0400 X-Originating-IP: 50.43.43.179 Date: Wed, 3 Jun 2015 09:38:57 -0700 From: Josh Triplett To: Denys Vlasenko Cc: Ingo Molnar , Linus Torvalds , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Andy Lutomirski , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , x86@kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/2] x86/asm/entry/32: Remove unnecessary optimization in stub32_clone Message-ID: <20150603163856.GA1744@x> References: <1433339930-20880-1-git-send-email-dvlasenk@redhat.com> <1433339930-20880-2-git-send-email-dvlasenk@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1433339930-20880-2-git-send-email-dvlasenk@redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jun 03, 2015 at 03:58:50PM +0200, Denys Vlasenko wrote: > Really swap arguments #4 and #5 in stub32_clone instead of "optimizing" > it into a move. > > Yes, tls_val is currently unused. Yes, on some CPUs XCHG is a little bit > more expensive than MOV. But a cycle or two on an expensive syscall like > clone() is way below noise floor, and this optimization is simply not worth > the obfuscation of logic. [...] > This is a resend. > > There was a patch by Josh Triplett > "x86: Opt into HAVE_COPY_THREAD_TLS, for both 32-bit and 64-bit" > sent on May 11, > which does the same thing as part of a bigger cleanup. > He was supportive of this patch because of comments. > He will simply have to drop one hunk from his patch. Strictly speaking, nothing needs this until clone starts paying attention to its tls argument, which only happens in my cleanup series that includes this change. So what's the purpose of driving this patch separately? - Josh Triplett