Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760845AbcLPLEu (ORCPT ); Fri, 16 Dec 2016 06:04:50 -0500 Received: from mout.kundenserver.de ([212.227.17.24]:64643 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756817AbcLPLEC (ORCPT ); Fri, 16 Dec 2016 06:04:02 -0500 From: Arnd Bergmann To: Yury Norov Cc: libc-alpha@sourceware.org, "Dr. Philipp Tomsich" , Catalin Marinas , linux-arch@vger.kernel.org, LKML , szabolcs.nagy@arm.com, heiko.carstens@de.ibm.com, cmetcalf@ezchip.com, "Joseph S. Myers" , zhouchengming1@huawei.com, "Kapoor, Prasun" , Alexander Graf , geert@linux-m68k.org, kilobyte@angband.pl, manuel.montezelo@gmail.com, Andrew Pinski , linyongting@huawei.com, Alexey Klimov , broonie@kernel.org, "Zhangjian (Bamvor)" , linux-arm-kernel , Maxim Kuvyrkov , Nathan Lynch , Martin Schwidefsky , davem@davemloft.net, christoph.muellner@theobroma-systems.com Subject: Re: [PATCH 3/3] mm: make pagoff_t type 64-bit Date: Fri, 16 Dec 2016 12:02:05 +0100 Message-ID: <2876865.6gs8EUOKyz@wuerfel> User-Agent: KMail/5.1.3 (Linux/4.4.0-34-generic; KDE/5.18.0; x86_64; ; ) In-Reply-To: <20161216105514.GA466@yury-N73SV> References: <1481461003-14361-1-git-send-email-ynorov@caviumnetworks.com> <2636242.RWRJivuddj@wuerfel> <20161216105514.GA466@yury-N73SV> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:hArDtYETzs/FbjGTNWSag1D+H5jECHxWgM0NrUfR19PY823pLXZ J8R+z2i7EHqsvXx7xbXR5Ecb2HZiRfh/7jUbe8/7rbldAvhf4i8XQAJbpmUr12F67UyTbZ5 DZ0M7XivhamFCeZLmUTzgK9lK2EzbM1XSwuSH5ggZ29DZ0o1aSgT11mfomqM5OrHmgFGdBm U3swTJ6JSOE1dxbxvrkKQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:pMKcxkMNNDo=:9Y5fLPpC0stwkNxny32lmr j9geIFKDyui0uL701hFywSZFxEEXcy3N9fPc09VNKFEf915oEa0g1Pp47ENaZne0RqiuK+cah hKkzYhSACYaTlR1IJcE+Kf30M4Js06027GhmJZm6Qi8As/RZI1W1pHuHQ5nBRExX3GCMAhfBy DM4ecQHWIrUSe7RkdB7zN9MvwtJIA1W4SQ7fciI2LLEEFjbuAt2NkmXLfi05orw19s/rEzdqX ACubJMarG2m38lh5NVzw7zimOmmvpe8ExWbPgDJ6IY58xf8rhgort9JODpjDt6vD6k4hC48Cw AFuhAA0p9Xe/RAnduLJXAZZk8xEKy8AeqpdWGHXWAEiJBabv+HmOJfn/RM26F8S/fVrgY2yfu OQ6FYZt6TmI8QSM3U5nRbFJZ5RiBRRvjVmW1XRtA2y7QTf+WiUz9maUCKpHBSl8AQ3YSEmmRj 9Cmc6lfTALshRGeRavk8+NfxKSopcaEJsD58gDNXyAsqAV2fEokSXM4DtV77gzXprrhaDQSsY xqQbpuuszXjOwZQxAYWOsGRLRKz5HRGV9U+hSOn8FEQspoim8X8udyXPTKioydGdtmHDJriuH u9ze0z1YwgpAo0X6E+3s9t5Oh6lf6+SSJQiEyq1lDkElZCpgsApW1mayV4J7rl0JuMS9K+fre 10RdouwpaZfwqSsN7OETcMRbrt6uylTdBfRmT0Q52l82alLNq0TCZbDahw1Z49A8Y/1ZotiAh Wh7Q9atpWmM4iAqF Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2216 Lines: 53 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 > > > > 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