Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752938AbdCTJQQ (ORCPT ); Mon, 20 Mar 2017 05:16:16 -0400 Received: from ozlabs.org ([103.22.144.67]:57933 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753469AbdCTJPx (ORCPT ); Mon, 20 Mar 2017 05:15:53 -0400 From: Michael Ellerman To: "Aneesh Kumar K.V" , "Kirill A. Shutemov" 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 In-Reply-To: <877f3lfzdo.fsf@skywalker.in.ibm.com> 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> User-Agent: Notmuch/0.21 (https://notmuchmail.org) Date: Mon, 20 Mar 2017 20:15:50 +1100 Message-ID: <87inn448c9.fsf@concordia.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 858 Lines: 20 "Aneesh Kumar K.V" writes: > "Kirill A. Shutemov" writes: >> On Fri, Mar 17, 2017 at 11:23:54PM +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 ? Yeah I think that makes sense, it retains the existing behaviour unless the hint itself is >= 128TB. cheers