This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC2 nowrap: PATCH v7 00/18] ILP32 for ARM64
- From: "Dr. Philipp Tomsich" <philipp dot tomsich at theobroma-systems dot com>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: Alexander Graf <agraf at suse dot de>, Arnd Bergmann <arnd at arndb dot de>, Catalin Marinas <catalin dot marinas at arm dot com>, linux-arm-kernel <linux-arm-kernel at lists dot infradead dot org>, LKML <linux-kernel at vger dot kernel dot org>, linux-doc at vger dot kernel dot org, linux-arch at vger dot kernel dot org, libc-alpha at sourceware dot org, Martin Schwidefsky <schwidefsky at de dot ibm dot com>, heiko dot carstens at de dot ibm dot com, Andrew Pinski <pinskia at gmail dot com>, broonie at kernel dot org, "Joseph S. Myers" <joseph at codesourcery dot com>, Christoph Müllner <christoph dot muellner at theobroma-systems dot com>, "Zhangjian (Bamvor)" <bamvor dot zhangjian at huawei dot com>, szabolcs dot nagy at arm dot com, Alexey Klimov <klimov dot linux at gmail dot com>, Nathan Lynch <Nathan_Lynch at mentor dot com>, "Kapoor, Prasun" <Prasun dot Kapoor at caviumnetworks dot com>, kilobyte at angband dot pl, geert at linux-m68k dot org, manuel dot montezelo at gmail dot com, linyongting at huawei dot com, maxim dot kuvyrkov at linaro dot org, davem at davemloft dot net, zhouchengming1 at huawei dot com, cmetcalf at ezchip dot com
- Date: Wed, 17 Aug 2016 14:54:59 +0200
- Subject: Re: [RFC2 nowrap: PATCH v7 00/18] ILP32 for ARM64
- Authentication-results: sourceware.org; auth=none
- References: <1471434403-25291-1-git-send-email-ynorov@caviumnetworks.com> <175AE090-EDA7-4A8D-9044-3FFA74AC1903@suse.de> <20160817124822.GA25751@yury-N73SV>
> On 17 Aug 2016, at 14:48, Yury Norov <ynorov@caviumnetworks.com> wrote:
>
> On Wed, Aug 17, 2016 at 02:28:50PM +0200, Alexander Graf wrote:
>>
>>> On 17 Aug 2016, at 13:46, Yury Norov <ynorov@caviumnetworks.com> wrote:
>>>
>>> This series enables aarch64 with ilp32 mode, and as supporting work,
>>> introduces ARCH_32BIT_OFF_T configuration option that is enabled for
>>> existing 32-bit architectures but disabled for new arches (so 64-bit
>>> off_t is is used by new userspace).
>>>
>>> This version is based on kernel v4.8-rc2.
>>> It works with glibc-2.23, and tested with LTP.
>>>
>>> This is RFC because there is still no solid understanding what type of registers
>>> top-halves delousing we prefer. In this patchset, w0-w7 are cleared for each
>>> syscall in assembler entry. The alternative approach is in introducing compat
>>> wrappers which is little faster for natively routed syscalls (~2.6% for syscall
>>> with no payload) but much more complicated.
>>
>> So you’re saying there are 2 options:
>>
>> 1) easy to get right, slightly slower, same ABI to user space as 2
>> 2) harder to get right, minor performance benefit
>
> No, ABI is little different. If 1) we pass off_t in a pair to syscalls,
> if 2) - in a single register. So if 1, we 'd take some wrappers from aarch32.
> See patch 12 here.
From our experience with ILP32, I’d prefer to have off_t (and similar) in a single register
whenever possible (i.e. option #2). It feels more natural to use the full 64bit registers
whenever possible, as ILP32 on ARMv8 should really be understood as a 64bit ABI with
a 32bit memory model.
Cheers,
Philipp.