From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752817AbbDVSFR (ORCPT ); Wed, 22 Apr 2015 14:05:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46626 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751620AbbDVSFO (ORCPT ); Wed, 22 Apr 2015 14:05:14 -0400 Message-ID: <5537E2B2.5050006@redhat.com> Date: Wed, 22 Apr 2015 20:04:34 +0200 From: Denys Vlasenko User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 MIME-Version: 1.0 To: Josh Triplett , Andy Lutomirski CC: Ingo Molnar , Linus Torvalds , Steven Rostedt , Borislav Petkov , "H. Peter Anvin" , Oleg Nesterov , Frederic Weisbecker , Alexei Starovoitov , Will Drewry , Kees Cook , X86 ML , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/2] x86/asm/entry/32: Remove unnecessary optimization in stub32_clone References: <1429720808-7173-1-git-send-email-dvlasenk@redhat.com> <1429720808-7173-2-git-send-email-dvlasenk@redhat.com> <20150422171005.GA1020@jtriplet-mobl1> In-Reply-To: <20150422171005.GA1020@jtriplet-mobl1> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/22/2015 07:10 PM, Josh Triplett wrote: > On Wed, Apr 22, 2015 at 09:54:24AM -0700, Andy Lutomirski wrote: >> On Wed, Apr 22, 2015 at 9:40 AM, 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 obfuscation of logic introduced >>> by this optimization is simply not worth it. >> >> Ditto re: Josh's patch. > > I do think my two-patch HAVE_COPY_THREAD_TLS series should go in fixing > this, but I'd like to see the final version of Denys' comment added on > top of it (with an update to the type and name of the tls argument to > match the changes to sys_clone). > > Denys, would you consider submitting a patch adding your comment on top > of the two-patch series I just sent? Okay.