Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965371AbdCXJD0 (ORCPT ); Fri, 24 Mar 2017 05:03:26 -0400 Received: from mail-wm0-f48.google.com ([74.125.82.48]:35430 "EHLO mail-wm0-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965314AbdCXJDP (ORCPT ); Fri, 24 Mar 2017 05:03:15 -0400 Date: Fri, 24 Mar 2017 12:03:07 +0300 From: "Kirill A. Shutemov" To: "Aneesh Kumar K.V" Cc: "Kirill A. Shutemov" , Linus Torvalds , Andrew Morton , x86@kernel.org, Thomas Gleixner , Ingo Molnar , Arnd Bergmann , "H. Peter Anvin" , Andi Kleen , Dave Hansen , Andy Lutomirski , Michal Hocko , linux-arch@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 26/26] x86/mm: allow to have userspace mappings above 47-bits Message-ID: <20170324090307.hcx57t6yr4wqv4uz@node.shutemov.name> References: <20170313055020.69655-1-kirill.shutemov@linux.intel.com> <20170313055020.69655-27-kirill.shutemov@linux.intel.com> <87a88jg571.fsf@skywalker.in.ibm.com> <20170317175714.3bvpdylaaudf4ig2@node.shutemov.name> <877f3lfzdo.fsf@skywalker.in.ibm.com> <878to1sl1v.fsf@skywalker.in.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <878to1sl1v.fsf@skywalker.in.ibm.com> User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 947 Lines: 24 On Sun, Mar 19, 2017 at 02:25:08PM +0530, Aneesh Kumar K.V wrote: > >>> So if I have done a successful mmap which returned > 128TB what should a > >>> following mmap(0,...) return ? Should that now search the *full* address > >>> space or below 128TB ? > >> > >> No, I don't think so. And this implementation doesn't do this. > >> > >> It's safer this way: if an library can't handle high addresses, it's > >> better not to switch it automagically to full address space if other part > >> of the process requested high address. > >> > > > > What is the epectation when the hint addr is below 128TB but addr + len > > > 128TB ? Should such mmap request fail ? > > Considering that we have stack at the top (around 128TB) we may not be > able to get a free area for such a request. But I guess the idea here is > that if hint address is below 128TB, we behave as though our TASK_SIZE > is 128TB ? Is that correct ? Right. -- Kirill A. Shutemov