Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1239976imu; Tue, 11 Dec 2018 15:34:41 -0800 (PST) X-Google-Smtp-Source: AFSGD/XZdXpY5dWREliY8Y+GZqU4Xp5D5+Icqu7OgSLiA3RcnW2CqAxV2gVIePvAEL1+n6NDsZZl X-Received: by 2002:a62:46d0:: with SMTP id o77mr18340863pfi.172.1544571281552; Tue, 11 Dec 2018 15:34:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1544571281; cv=none; d=google.com; s=arc-20160816; b=yti+UhgXBRBR+dKthwha6fNdCS6lyoEhIPhCMKWGqWog6r4mJI8SKRtbotMjI4y3/L 8XInUwBm18bka7BQ7Q99wkHpt0nkHErIXmOi1dZ1AbvOwUeB70ZGkjqhvbJTmMIbCgyw FgqFVu+OqconAfc5u/2QrrtDt42I8jQ+oDrHoSz9+VGBIbNHpA8cZDMyQnUznlkEY8eU VkAuhVNmDZm/8eC22HpHM955BeYTNwdCcTpSVSIoknRm1DYthN8jVfSqxWLRAPgkv8PG 7Y9LTqzHXTHbcMoiyxPzjFNQ10IMLTSMrluxkEAJRdKZ5c+RsnCRzJCKJADVAj6jbPGY nlyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=1xDrCmVJhsj6AruFa0lf4YBxjOHbMqG4lAE7ly9DVHQ=; b=Gg/IiJa0HB68YNK5yo5JBvu1x7xU4kgJSRyKhXHR0o4fJiXUlDra091aYOrQDH9Qn5 mXJoS+aJg/8l9zA4AWyzqNwCllkgz24CCTYskh9kuxp2tMo/rUo2ihFqfpd1kVXoUY+g LLsha4l0SJ5AKY8kTUH481eNAjC53YFjC0ot9hrLyrkAyKa9xiwZB02NAcQsz1K155mk i/UNDlOAXze7HJz9/p7yrUCCCpOf6mySVv7c32al2IkPnoeFPHILlgUv0bqz6XldZ1cK oIvmbJc0kxef4Ofk+txy5yMLDv3/oP4+XZM1XYlAd2VAHATab9U+hyaSshavaJu+6r+D Jy0Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m19si13091736pls.437.2018.12.11.15.34.18; Tue, 11 Dec 2018 15:34:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726229AbeLKXd2 (ORCPT + 99 others); Tue, 11 Dec 2018 18:33:28 -0500 Received: from 216-12-86-13.cv.mvl.ntelos.net ([216.12.86.13]:58748 "EHLO brightrain.aerifal.cx" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726158AbeLKXd2 (ORCPT ); Tue, 11 Dec 2018 18:33:28 -0500 Received: from dalias by brightrain.aerifal.cx with local (Exim 3.15 #2) id 1gWrWe-0007p9-00; Tue, 11 Dec 2018 23:33:16 +0000 Date: Tue, 11 Dec 2018 18:33:16 -0500 From: Rich Felker To: Thorsten Glaser Cc: John Paul Adrian Glaubitz , Andy Lutomirski , X86 ML , LKML , Linux API , "H. Peter Anvin" , Peter Zijlstra , Borislav Petkov , Florian Weimer , Mike Frysinger , "H. J. Lu" , x32@buildd.debian.org, Arnd Bergmann , Will Deacon , Catalin Marinas , Linus Torvalds Subject: Re: Can we drop upstream Linux x32 support? Message-ID: <20181211233316.GN23599@brightrain.aerifal.cx> References: <70bb54b2-8ed3-b5ee-c02d-6ef66c4f27eb@physik.fu-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Dec 11, 2018 at 09:59:48PM +0000, Thorsten Glaser wrote: > John Paul Adrian Glaubitz dixit: > > >I can't say anything about the syscall interface. However, what I do know > >is that the weird combination of a 32-bit userland with a 64-bit kernel > >interface is sometimes causing issues. For example, application code usually > > Yes, but more and more ${foo}64ilp32 architectures are popping up. > > >Additionally, x32 support in many applications is either rudimentary > > If a signal is sent that this kind of architectures will stay, some > people might be convinced to fix that. > > >It's also that the performance benefits of x32 are often eaten up by > >the fact that none of the scripted languages that I know of provide > > Non-JITted languages like yours truly’s shell do benefit from it, > though. (mksh works just fine on LP64 but its internal structures > pack massively better on ILP32, for example.) gcc also benefits massively, up to 2x or more performance improvement from ILP32, just because you can double your -jN to make. The "or more" comes from cache utilization also improving. Actually I often use i486 gcc even on 64-bit systems for this reason, and have observed this order of improvement despite the lack of registers and worse call ABI. Presumably x32 would be better, but I've avoided it because of how buggy it's been in the past. > >If x32 is eventually to be removed, we should also take care of removing > >x32 support from userland code. From the top of my head, this would at least > > I don’t think so. The patches also contain > – stuff to support 64-bit time_t on 32-bit architectures, e.g: > - bugfixes like printf("%lld", (long long)timet_value) instead > of assuming time_t fits into a long (also important for other > operating systems…) > - generally switching from generic types like long to specific > types like size_t, ptrdiff_t, etc. > - there was one more but after having written two eMails I forgot it > - oh and, of course, they lay the base for e.g. amd64ilp32 support I would not classify any of that as part of "removing x32 support", but rather as "reintroducing broken assumptions". I think "removing x32 support" was intended to mean places where there's explicitly-x32-specific code or tooling, like asm functions/fragments in libc, x32 versions of the dispatch asm in mesa, x32 code generation, etc. Obviously (at least I hope it's obvious) nonportable assumptions should not be reintroduced regardless of whether x32 is dropped. FWIW x32 is nice as a test case for catching such nonportable assumptions and getting them fixed. Rich