Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp538673pxf; Wed, 10 Mar 2021 11:16:39 -0800 (PST) X-Google-Smtp-Source: ABdhPJx3qEYu0hrzg6dzMHLWf98c7wlBTeDPFEBYuEPeUD+Eb5gnh18gBSYue3DCJIFQabog+yNi X-Received: by 2002:a05:6402:11c9:: with SMTP id j9mr5000784edw.348.1615403799747; Wed, 10 Mar 2021 11:16:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615403799; cv=none; d=google.com; s=arc-20160816; b=B8000hD/qysTRJ1/JqlY4ce5t/6cA2gqs/DDw6nzt3G1uOxHm6yGnNumkzXMelM00I uho8aA92MdAUiREJSE2YND5AiNJ52bnIKBl+kk5oFlHZmtNjyJe5n75r3l8EUhsvAosK sNy4/p3dkdl0aIAvKeFPPiKPLcTyYW0+5XjFQdskrvHEnfiYBOxOw59AwhLDammQLequ 1qpEhKrn5NYijEwvWLNBdoJfUL4xOGUUfbHTTc14FkhZK9fCq82p5QnezyDd0jGNnRzN Q1uyLJ2PACfE3Q//+ku53z9BvBvN8McwyNLUEP8Y8WPKnBpS7VtpSH+kAZZ9QCX4aeHn zkEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=nHlVRETe4AEbKPNmvv7gLydt0lu0ZQ8TOIuigAPHvo0=; b=lHRwXm3C98NjbwP+GsdlWMV7UaYg12bDJ88mN4GA034L5+2JHGw9hvj9EZrwTKKk7v iW1Tvnurb6pH4FEWgyyQL1OY0FaoiN3wms46yw/kM4BnfRcPkiJxpgDu2CiGeRAEyiJj 4/VRfb6AILlg9x9bSGSwujw5uC1Qy9AJXlatk29WfErQt64MRgX6UmxvOuDOcNE4pmNG 7+k13/ozcc1g0F9go5CJPYAlCj5Ab974EOeRyNzLF/Q9RMg1h7h3v/iudVGwiRwc9DKd xmEgL/oGBxGxvkyvMXNJqJ2fzpKgwJGSXz98CybVnTDPoJk2gslSySj8ckdAv7/BssVx 2Jqw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x10si165706ejw.389.2021.03.10.11.16.17; Wed, 10 Mar 2021 11:16:39 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229828AbhCJTNV (ORCPT + 99 others); Wed, 10 Mar 2021 14:13:21 -0500 Received: from relay11.mail.gandi.net ([217.70.178.231]:44741 "EHLO relay11.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232417AbhCJTND (ORCPT ); Wed, 10 Mar 2021 14:13:03 -0500 Received: from [192.168.1.12] (lfbn-lyo-1-457-219.w2-7.abo.wanadoo.fr [2.7.49.219]) (Authenticated sender: alex@ghiti.fr) by relay11.mail.gandi.net (Postfix) with ESMTPSA id 9F5FB100006; Wed, 10 Mar 2021 19:12:55 +0000 (UTC) Subject: Re: [PATCH 2/3] Documentation: riscv: Add documentation that describes the VM layout To: Arnd Bergmann 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 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> From: Alex Ghiti Message-ID: <236a9788-8093-9876-a024-b0ad0d672c72@ghiti.fr> Date: Wed, 10 Mar 2021 14:12:56 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Arnd, Le 3/10/21 à 6:42 AM, Arnd Bergmann a écrit : > On Thu, Feb 25, 2021 at 12:56 PM Alex Ghiti wrote: >> >> Le 2/25/21 à 5:34 AM, David Hildenbrand a écrit : >>> | | | |> + >>> ffffffc000000000 | -256 GB | ffffffc7ffffffff | 32 GB | kasan >>>> + ffffffcefee00000 | -196 GB | ffffffcefeffffff | 2 MB | fixmap >>>> + ffffffceff000000 | -196 GB | ffffffceffffffff | 16 MB | PCI io >>>> + ffffffcf00000000 | -196 GB | ffffffcfffffffff | 4 GB | vmemmap >>>> + 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. This was what my previous version did: https://lkml.org/lkml/2020/6/7/28. This approach was not welcomed very well and it fixed only the problem of the implementation of relocatable kernel. The second issue I'm trying to resolve here is to support both 3 and 4 level page tables using the same kernel without being relocatable (which would introduce performance penalty). I can't do it when the kernel mapping is in the vmalloc region since vmalloc region relies on PAGE_OFFSET which is different on both 3 and 4 level page table and that would then require the kernel to be relocatable. Alex > > Arnd > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv >