From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751600AbdKVILw (ORCPT ); Wed, 22 Nov 2017 03:11:52 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:41951 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751475AbdKVILu (ORCPT ); Wed, 22 Nov 2017 03:11:50 -0500 X-Google-Smtp-Source: AGs4zMa/vBEOQIi3dYXfqGLy3a7ufFhrac9K/FulxH0+pi97Dmezkz3lls1GsNAcudcTi6JAv5v18g== Date: Wed, 22 Nov 2017 11:11:47 +0300 From: "Kirill A. Shutemov" To: "Aneesh Kumar K.V" Cc: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Linus Torvalds , Andy Lutomirski , Nicholas Piggin , linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCHv3 2/2] x86/selftests: Add test for mapping placement for 5-level paging Message-ID: <20171122081147.5gjushlstmnnmlev@node.shutemov.name> References: <20171115143607.81541-1-kirill.shutemov@linux.intel.com> <20171115143607.81541-2-kirill.shutemov@linux.intel.com> <87y3myzx7z.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y3myzx7z.fsf@linux.vnet.ibm.com> User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 22, 2017 at 11:11:36AM +0530, Aneesh Kumar K.V wrote: > "Kirill A. Shutemov" writes: > > > With 5-level paging, we have 56-bit virtual address space available for > > userspace. But we don't want to expose userspace to addresses above > > 47-bits, unless it asked specifically for it. > > > > We use mmap(2) hint address as a way for kernel to know if it's okay to > > allocate virtual memory above 47-bit. > > > > Let's add a self-test that covers few corner cases of the interface. > > > > Signed-off-by: Kirill A. Shutemov > > Can we move this to selftest/vm/ ? I had a variant which i was using to > test issues on ppc64. One change we did recently was to use >=128TB as > the hint addr value to select larger address space. I also would like to > check for exact mmap return addr in some case. Attaching below the test > i was using. I will check whether this patch can be updated to test what > is converted in my selftest. I also want to do the boundary check twice. > The hash trasnslation mode in POWER require us to track addr limit and > we had bugs around address space slection before and after updating the > addr limit. Feel free to move it to selftest/vm. I don't have time to test setup and test it on Power myself, but this would be great. -- Kirill A. Shutemov From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f198.google.com (mail-wr0-f198.google.com [209.85.128.198]) by kanga.kvack.org (Postfix) with ESMTP id 8B1186B0253 for ; Wed, 22 Nov 2017 03:11:53 -0500 (EST) Received: by mail-wr0-f198.google.com with SMTP id k100so9633425wrc.9 for ; Wed, 22 Nov 2017 00:11:53 -0800 (PST) Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id v11sor8376971edb.25.2017.11.22.00.11.49 for (Google Transport Security); Wed, 22 Nov 2017 00:11:50 -0800 (PST) Date: Wed, 22 Nov 2017 11:11:47 +0300 From: "Kirill A. Shutemov" Subject: Re: [PATCHv3 2/2] x86/selftests: Add test for mapping placement for 5-level paging Message-ID: <20171122081147.5gjushlstmnnmlev@node.shutemov.name> References: <20171115143607.81541-1-kirill.shutemov@linux.intel.com> <20171115143607.81541-2-kirill.shutemov@linux.intel.com> <87y3myzx7z.fsf@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87y3myzx7z.fsf@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: "Aneesh Kumar K.V" Cc: "Kirill A. Shutemov" , Ingo Molnar , x86@kernel.org, Thomas Gleixner , "H. Peter Anvin" , Linus Torvalds , Andy Lutomirski , Nicholas Piggin , linux-mm@kvack.org, linux-kernel@vger.kernel.org On Wed, Nov 22, 2017 at 11:11:36AM +0530, Aneesh Kumar K.V wrote: > "Kirill A. Shutemov" writes: > > > With 5-level paging, we have 56-bit virtual address space available for > > userspace. But we don't want to expose userspace to addresses above > > 47-bits, unless it asked specifically for it. > > > > We use mmap(2) hint address as a way for kernel to know if it's okay to > > allocate virtual memory above 47-bit. > > > > Let's add a self-test that covers few corner cases of the interface. > > > > Signed-off-by: Kirill A. Shutemov > > Can we move this to selftest/vm/ ? I had a variant which i was using to > test issues on ppc64. One change we did recently was to use >=128TB as > the hint addr value to select larger address space. I also would like to > check for exact mmap return addr in some case. Attaching below the test > i was using. I will check whether this patch can be updated to test what > is converted in my selftest. I also want to do the boundary check twice. > The hash trasnslation mode in POWER require us to track addr limit and > we had bugs around address space slection before and after updating the > addr limit. Feel free to move it to selftest/vm. I don't have time to test setup and test it on Power myself, but this would be great. -- Kirill A. Shutemov -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org