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=-4.1 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 035EBC433E0 for ; Wed, 22 Jul 2020 21:06:11 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 775292086A for ; Wed, 22 Jul 2020 21:06:10 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=atishpatra.org header.i=@atishpatra.org header.b="DtMjrfPK" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 775292086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=atishpatra.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B8E1A6B0002; Wed, 22 Jul 2020 17:06:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B3EB56B0005; Wed, 22 Jul 2020 17:06:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A2E0A6B0006; Wed, 22 Jul 2020 17:06:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0043.hostedemail.com [216.40.44.43]) by kanga.kvack.org (Postfix) with ESMTP id 88D256B0002 for ; Wed, 22 Jul 2020 17:06:09 -0400 (EDT) Received: from smtpin14.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 305FB184B6074 for ; Wed, 22 Jul 2020 21:06:09 +0000 (UTC) X-FDA: 77066944458.14.twig37_441685526f39 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin14.hostedemail.com (Postfix) with ESMTP id EF4B818015991 for ; Wed, 22 Jul 2020 21:06:08 +0000 (UTC) X-HE-Tag: twig37_441685526f39 X-Filterd-Recvd-Size: 5326 Received: from mail-wm1-f66.google.com (mail-wm1-f66.google.com [209.85.128.66]) by imf29.hostedemail.com (Postfix) with ESMTP for ; Wed, 22 Jul 2020 21:06:08 +0000 (UTC) Received: by mail-wm1-f66.google.com with SMTP id w3so3276736wmi.4 for ; Wed, 22 Jul 2020 14:06:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=atishpatra.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=pUykGa+mtQ5qLEJzpM6lTm4DyeH44yHQyhTxXONta+M=; b=DtMjrfPK33UpsHV7ieVtBoXhLIYg/jlJtL/BwT+t06XPoZuxolm3MZwCr//MnlAhv7 olpqshFL30eLQy1W2/XqwGp6TQ4RerXlU6stdyUroQWPo3+FNPAxh8fnNdtX7F+nvEDT VJ2MTsTfnTkK/RixP0LCc4xF2mzNoGq5Ig8To= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=pUykGa+mtQ5qLEJzpM6lTm4DyeH44yHQyhTxXONta+M=; b=Ao8FeKiMHQJY/Fr+EJfAjXUzLHsttcqaRMqtBOBudtN3LHmlPIU9e9AvWVNrwFPrel +WtDdao1dIag21AMH7AWe/vIVFn/PK5YFsuSqU4e5P7kgQdHJWjByWDET4T6NUXVjCGw 2Kpx8WzZ5lcBZAn4PqbTdL9IP1ArViSyRsZQSD0doGV9yGKcXh7VnWcBuf1917fjCh6v dKqkiZShEpUtFAfWp9J8Fq9owuV5pF6jm0pee/TbxmJqq/9ecoSX+bJkhnvClmRRtTRE W7cWrlZyIdKj+piKKAp12a0Cyz9VCNuYvsdoamkebS5005KiSom15XoAP2WERrH73oA/ 5Z+Q== X-Gm-Message-State: AOAM533VmbygfL4vTSvvzcmzGMofoglQvWsUad7CQkj/dgVQBhqvPO7Q QSUQz7NxWJydrT+T5FaTST1uZGqlDvauWlHZuKR0 X-Google-Smtp-Source: ABdhPJwhNpZUdU/OnWtik2XTzTS4UMH8jcwWO9Hxmgqgvl3smhQmAYatCRp4hQfaVCyVsPrlT6KIYfciVm1lrAWgeu4= X-Received: by 2002:a1c:dc02:: with SMTP id t2mr1223465wmg.55.1595451967050; Wed, 22 Jul 2020 14:06:07 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Atish Patra Date: Wed, 22 Jul 2020 14:05:55 -0700 Message-ID: Subject: Re: [PATCH v5 1/4] riscv: Move kernel mapping to vmalloc zone To: Arnd Bergmann Cc: Palmer Dabbelt , Albert Ou , Alexandre Ghiti , Atish Patra , Benjamin Herrenschmidt , Anup Patel , "linux-kernel@vger.kernel.org" , Paul Walmsley , Linux-MM , Paul Mackerras , Zong Li , Michael Ellerman , linux-riscv , linuxppc-dev Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: EF4B818015991 X-Spamd-Result: default: False [0.00 / 100.00] X-Rspamd-Server: rspam04 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 Wed, Jul 22, 2020 at 1:23 PM Arnd Bergmann wrote: > > On Wed, Jul 22, 2020 at 9:52 PM Palmer Dabbelt wrote: > > On Wed, 22 Jul 2020 02:43:50 PDT (-0700), Arnd Bergmann wrote: > > > On Tue, Jul 21, 2020 at 9:06 PM Palmer Dabbelt wrote: > > > The eventual goal is to have a split of 3840MB for either user or linear map > > > plus and 256MB for vmalloc, including the kernel. Switching between linear > > > and user has a noticeable runtime overhead, but it relaxes both the limits > > > for user memory and lowmem, and it provides a somewhat stronger > > > address space isolation. > > > > Ya, I think we decided not to do that, at least for now. I guess the right > > answer there will depend on what 32-bit systems look like, and since we don't > > have any I'm inclined to just stick to the fast option. > > Makes sense. Actually on 32-bit Arm we see fewer large-memory > configurations in new machines than we had in the past before 64-bit > machines were widely available at low cost, so I expect not to see a > lot new hardware with more than 1GB of DDR3 (two 256Mbit x16 chips) > for cost reasons, and rv32 is likely going to be similar, so you may never > really see a need for highmem or the above hack to increase the > size of the linear mapping. > > I just noticed that rv32 allows 2GB of lowmem rather than just the usual > 768MB or 1GB, at the expense of addressable user memory. This seems > like an unusual choice, but I also don't see any reason to change this > or make it more flexible unless actual users appear. > I am a bit confused here. As per my understanding, RV32 supports 1GB of lowmem only as the page offset is set to 0xC0000000. The config option MAXPHYSMEM_2GB is misleading as RV32 actually allows 1GB of physical memory only. Any memory blocks beyond DRAM + 1GB are removed in setup_bootmem. IMHO, The current config should clarify that. Moreover, we should add 2G split under a separate configuration if we want to support that. > Arnd > > _______________________________________________ > linux-riscv mailing list > linux-riscv@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-riscv -- Regards, Atish