From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 563B2C433DB for ; Wed, 10 Mar 2021 11:43:18 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id A90AC64FD7 for ; Wed, 10 Mar 2021 11:43:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A90AC64FD7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=arndb.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 298B18D019D; Wed, 10 Mar 2021 06:43:17 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 26FDF8D0195; Wed, 10 Mar 2021 06:43:17 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 110CE8D019D; Wed, 10 Mar 2021 06:43:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0106.hostedemail.com [216.40.44.106]) by kanga.kvack.org (Postfix) with ESMTP id EAEC98D0195 for ; Wed, 10 Mar 2021 06:43:16 -0500 (EST) Received: from smtpin07.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id B0E811802822A for ; Wed, 10 Mar 2021 11:43:16 +0000 (UTC) X-FDA: 77903778792.07.B81B35E Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by imf21.hostedemail.com (Postfix) with ESMTP id 51B72E0001B4 for ; Wed, 10 Mar 2021 11:43:14 +0000 (UTC) Received: from mail-oi1-f174.google.com ([209.85.167.174]) by mrelayeu.kundenserver.de (mreue108 [213.165.67.113]) with ESMTPSA (Nemesis) id 1N33AR-1ljRE72bE5-013JfR for ; Wed, 10 Mar 2021 12:43:14 +0100 Received: by mail-oi1-f174.google.com with SMTP id u62so2945050oib.6 for ; Wed, 10 Mar 2021 03:43:13 -0800 (PST) X-Gm-Message-State: AOAM530De8pVWxTFc4SGBljFQcC4fKCg6r9Vb+vdHOgVq3kTeCOZSOpv GE2ODNDLnlCGbC8moFYFpKfk27uGHH72mHQ7BsI= X-Google-Smtp-Source: ABdhPJxlHt0uYmch4USUhyI1PmZYpWv5SFHgA7xLm+M/LTOw8bqf4Cpyeoo3gC1uj5lb01XEoAYopnrDQGHXZzFybs8= X-Received: by 2002:a05:6808:3d9:: with SMTP id o25mr2139659oie.4.1615376592865; Wed, 10 Mar 2021 03:43:12 -0800 (PST) MIME-Version: 1.0 References: <20210225080453.1314-1-alex@ghiti.fr> <20210225080453.1314-3-alex@ghiti.fr> <5279e97c-3841-717c-2a16-c249a61573f9@redhat.com> <7d9036d9-488b-47cc-4673-1b10c11baad0@ghiti.fr> In-Reply-To: <7d9036d9-488b-47cc-4673-1b10c11baad0@ghiti.fr> From: Arnd Bergmann Date: Wed, 10 Mar 2021 12:42:56 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH 2/3] Documentation: riscv: Add documentation that describes the VM layout To: Alex Ghiti Cc: David Hildenbrand , Jonathan Corbet , Paul Walmsley , Palmer Dabbelt , Albert Ou , Andrey Ryabinin , Alexander Potapenko , Dmitry Vyukov , "open list:DOCUMENTATION" , linux-riscv , "linux-kernel@vger.kernel.org" , kasan-dev , linux-arch , Linux-MM , Linus Walleij Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:nfobdLVPcGt0GkMpUvwkpjTUkuCCeenwXYwRxWNLTYDgRrP1BfL YsiGu377AN7OXPWQm8fv/eGcJIWYqLsPqi5neE58Jq4Bavv1TqYDQhPwgqF3OGMX2HEfjUr kOCusbKb6KFuo4XsSSdqsnmM13cTUmZRoyJSMHOeU+Uh+RyoUMyXNQjvE8YK4d072WmlYP8 0v+VJ7+NQI1j8GyDNytdg== X-UI-Out-Filterresults: notjunk:1;V03:K0:/v5P2/tuHL0=:Ue3B/60QVEI5Yt8rQs1E4i 4gbqNS3jN6cXb5v0BlVuZS6LSMigads1VpuHnErD6OlrcHAfwDxWqYjP5Du2OBB5xO0E69bLT HorDVUTs5JEh3gSGl8/puJsOV721F5eXkXcAV1gF2W/hLTIQDH5Wr5jJhpPj6HNIIbcSrTy7A WWFME03hQOli6B5Z4ur8ppXsZeCcbhMoVx6w+1e2AnyVk0oDKqt7doq8BgSnsy7JUeojMupxW 8VTPojy/lTqMucUEH3SqspU4ebioOfjaAJRquDXFw7Ewz6qB64OID1lEUxMrwHKafAmfupPNt P5zavI3Je5iOMrnIjYvX8QJ+jGSKUky4BVvmCtmU5XfVp3ZAQHvSJikzDGSyyIMhMg1s+DrIb 8XvsHom23VlX0elN4tjuxgiwcWYCCVQW+o0sy2qMS7M4v7p8A6KoUaPfGrQui5Ixu62BmbCMc L7G1FbkyCbp+pLz+39S9P7bDGROVEPmJQe2pAsM7UNe6dYG6Xre7AilmST+sg5hT9h/YC0RJ8 fPJ7CWfEIrH2wguh8k+koRpcYnOs3mdV7OzYCHoTC1IgV1ezPKb8bMvN/b637wyxQ== X-Stat-Signature: 3cxu5im9cjdgixx3bhqphqqy1t1d4ss8 X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 51B72E0001B4 Received-SPF: none (arndb.de>: No applicable sender policy available) receiver=imf21; identity=mailfrom; envelope-from=""; helo=mout.kundenserver.de; client-ip=217.72.192.73 X-HE-DKIM-Result: none/none X-HE-Tag: 1615376594-606771 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu, Feb 25, 2021 at 12:56 PM Alex Ghiti wrote: > > Le 2/25/21 =C3=A0 5:34 AM, David Hildenbrand a =C3=A9crit : > > | | | |> + > > ffffffc000000000 | -256 GB | ffffffc7ffffffff | 32 GB | kasan > >> + ffffffcefee00000 | -196 GB | ffffffcefeffffff | 2 MB | fixma= p > >> + ffffffceff000000 | -196 GB | ffffffceffffffff | 16 MB | PCI i= o > >> + ffffffcf00000000 | -196 GB | ffffffcfffffffff | 4 GB | vmemm= ap > >> + ffffffd000000000 | -192 GB | ffffffdfffffffff | 64 GB | > >> vmalloc/ioremap space > >> + ffffffe000000000 | -128 GB | ffffffff7fffffff | 126 GB | > >> direct mapping of all physical memory > > > > ^ So you could never ever have more than 126 GB, correct? > > > > I assume that's nothing new. > > > > Before this patch, the limit was 128GB, so in my sense, there is nothing > new. If ever we want to increase that limit, we'll just have to lower > PAGE_OFFSET, there is still some unused virtual addresses after kasan > for example. Linus Walleij is looking into changing the arm32 code to have the kernel direct map inside of the vmalloc area, which would be another place that you could use here. It would be nice to not have too many different ways of doing this, but I'm not sure how hard it would be to rework your code, or if there are any downsides of doing this. Arnd