This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 3/3] mm: make pagoff_t type 64-bit
- From: Arnd Bergmann <arnd at arndb dot de>
- To: Yury Norov <ynorov at caviumnetworks dot com>
- Cc: libc-alpha at sourceware dot org, "Dr. Philipp Tomsich" <philipp dot tomsich at theobroma-systems dot com>, Catalin Marinas <catalin dot marinas at arm dot com>, linux-arch at vger dot kernel dot org, LKML <linux-kernel at vger dot kernel dot org>, szabolcs dot nagy at arm dot com, heiko dot carstens at de dot ibm dot com, cmetcalf at ezchip dot com, "Joseph S. Myers" <joseph at codesourcery dot com>, zhouchengming1 at huawei dot com, "Kapoor, Prasun" <Prasun dot Kapoor at caviumnetworks dot com>, Alexander Graf <agraf at suse dot de>, geert at linux-m68k dot org, kilobyte at angband dot pl, manuel dot montezelo at gmail dot com, Andrew Pinski <pinskia at gmail dot com>, linyongting at huawei dot com, Alexey Klimov <klimov dot linux at gmail dot com>, broonie at kernel dot org, "Zhangjian (Bamvor)" <bamvor dot zhangjian at huawei dot com>, linux-arm-kernel <linux-arm-kernel at lists dot infradead dot org>, Maxim Kuvyrkov <maxim dot kuvyrkov at linaro dot org>, Nathan Lynch <Nathan_Lynch at mentor dot com>, Martin Schwidefsky <schwidefsky at de dot ibm dot com>, davem at davemloft dot net, christoph dot muellner at theobroma-systems dot com
- Date: Fri, 16 Dec 2016 12:02:05 +0100
- Subject: Re: [PATCH 3/3] mm: make pagoff_t type 64-bit
- Authentication-results: sourceware.org; auth=none
- References: <1481461003-14361-1-git-send-email-ynorov@caviumnetworks.com> <2636242.RWRJivuddj@wuerfel> <20161216105514.GA466@yury-N73SV>
On Friday, December 16, 2016 4:25:14 PM CET Yury Norov wrote:
> On Sun, Dec 11, 2016 at 03:59:01PM +0100, Arnd Bergmann wrote:
> > On Sunday, December 11, 2016 6:26:42 PM CET Yury Norov wrote:
> > > Also fix related interfaces
> > >
> > > Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
> >
> > Thanks Yury for the demonstration. I think this would put the nail
> > in the coffin of the idea of mmap64 even for Pavel, who didn't
> > seem convinced already.
> >
> > Changing all those interfaces and structure, struct page in particular,
> > is clearly too costly for any advantage we might have otherwise
> > gained.
> >
> > Arnd
>
> To be complete, we have 3 options:
> 1 leave things as is. 32-bit architectures will have no option to
> mmap big offsets, and no one cares - as usual.
> 2 add mmap64() for compat arches only. This way we don't need patch
> 3, and arches like aarch32 or aarch64/ilp32 will enjoy true 64-bit
> offsets.
> 3 introduce CONFIG_64_BIT_PGOFF_T, and let Pavel enable it if he has
> to work with big files on 32-bit arches.
>
> The most realistic approach for me is 1 because I never heard about
> 64-bit pgoff_t requests, except Pavel's one. Thinking about
> aarch64/ilp32, we probably need second approach. This is only 2 simple
> patches that are already there, and one patch in glibc. It will let
> 32-bit software work in 64-bit environment more smoothly. Cavium
> people should be completely satisfied with 2.
Agreed: If there is a serious request from Cavium or Huawei (which
are also very interested in this feature) and a specific use case,
we can still do 2 easily.
> Third is more looking like research exercise than something we need
> in practice.
Right.
> The only thing that makes me sad is that we proudly declare 64-bit
> off_t in new 32-bit ABIs but in fact we lie, at least in this
> specific case. We should add corresponding checks on glibc side at
> least. It's also simple.
Well, the only thing we are really saying there is that we support
more than 32-bit, and that the ABI uses 64-bit. Actually doing 64-bit
offsets within (very sparse) files probably also fails on 64-bit
architectures, at least on some file systems.
Arnd