Path: csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!bofh.it!news.nic.it!robomod From: "Kirill A. Shutemov" Newsgroups: linux.kernel Subject: Re: Question on the five-level page table support patches Date: Mon, 24 Apr 2017 18:30:03 +0200 Message-ID: References: X-Original-To: John Paul Adrian Glaubitz Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=shutemov-name.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=jNSYLVuuVoARqE4lIcUbQORd6i9tI7q2CcW5wGLuUDM=; b=CK2tE289+5Q+BTlhvuCslK3xysQZFo2/7Vz2dnu7iXk5H7DBTiEdVP/Uxq6ICipZ8T cw3KoOfF78kmSIaf42j/Om7yZWZr2HaKEyJ4xfA+w1rrIQeoc3zznWno7zMPOPur3pZ3 9LgviS5GVLtEs8DOG4Sc6n7baNq8Q23cwhWydu3bmwB2mia78fOLwJDI2DAAFGaFJQTo lPTbecJpSqrofWgNMhqdg0Q7p2lEuX4aGL69X0aPo+lQheWqwQoLCI1VXtq4tOaDTEXC or6oBg4QF8nJHscIdcEXgpMNZFpiEh685xY/8SFqeeRrRoiwU0vhtv3gH/lLPJWIrA0C aKZQ== X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=jNSYLVuuVoARqE4lIcUbQORd6i9tI7q2CcW5wGLuUDM=; b=S7ippOo/HMbLhQPrycoH8cOMjJeO7GwQEbZCxaAdvaruXSsvjuH5x528kCn3F7OC1K xiWztBPYCPHGgUIUDy4/jZc3SG/1AF7eHg8cKZCFlEB14GsfxDxbw05PzWlB7l/oj6Lh fZ4ZEgUhlGdqu6/mb+cZu62awlaRB0fNcdepAoZ8emIFrYmfl7w1DLGTBuLaR4pP9pzD ijPvEGY52R3kUg+srtptiA4yFXn6ymGRonWUnCjtO5pXPZ4mbEJo7Ma4EzrBpr6UywN2 olE/hmi/c442GgdgLDGvT1J85zF224eVBgFxceeEpJsk381gfDA9pFPHWbX8GCYQFSLG jw1Q== X-Gm-Message-State: AN3rC/7iNEq0hx8jgH/UTDN3jJzGqtkKmfNl+sqcH5yJq5f4C12cwBgf 9+x8UaLje9FElw== X-Received: by 10.80.179.209 with SMTP id t17mr1677365edd.62.1493050801515; Mon, 24 Apr 2017 09:20:01 -0700 (PDT) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170306 (1.8.0) Sender: robomod@news.nic.it List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Approved: robomod@news.nic.it Lines: 32 Organization: linux.* mail to news gateway X-Original-Cc: "Kirill A. Shutemov" , linux-kernel@vger.kernel.org, Andi Kleen , Dave Hansen , Andy Lutomirski , Michal Hocko , linux-arch@vger.kernel.org, linux-mm@kvack.org X-Original-Date: Mon, 24 Apr 2017 19:19:59 +0300 X-Original-Message-ID: <20170424161959.c5ba2nhnxyy57wxe@node.shutemov.name> X-Original-References: <030ea57b-5f6c-13d8-02f7-b245a754a87d@physik.fu-berlin.de> X-Original-Sender: linux-kernel-owner@vger.kernel.org Xref: csiph.com linux.kernel:1629768 On Sun, Apr 23, 2017 at 12:53:46PM +0200, John Paul Adrian Glaubitz wrote: > Hi Kirill! > > I recently read the LWN article on your and your colleagues work to > add five-level page table support for x86 to the Linux kernel [1] > and I got your email address from the last patch of the series. > > Since this extends the address space beyond 48-bits, as you may know, > it will cause potential headaches with Javascript engines which use > tagged pointers. On SPARC, the virtual address space already extends > to 52 bits and we are running into these very issues with Javascript > engines on SPARC. > > Now, a possible way to mitigate this problem would be to pass the > "hint" parameter to mmap() in order to tell the kernel not to allocate > memory beyond the 48 bits address space. Unfortunately, on Linux this > will only work when the area pointed to by "hint" is unallocated which > means one cannot simply use a hardcoded "hint" to mitigate this problem. In proposed implementation, we also use hint address, but in different way: by default, if hint address is NULL, kernel would not create mappings above 47-bits, preserving compatibility. If an application wants to have access to larger address space, it has to specify hint addess above 47-bits. See details here: http://lkml.kernel.org/r/20170420162147.86517-10-kirill.shutemov@linux.intel.com -- Kirill A. Shutemov