Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp813305ybh; Wed, 22 Jul 2020 14:06:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxECZ7+7p4uq+kNAvyOiDlI7ZvzV0n9TRwYdkjTbGu61yC94gWTlZY2TArmMzMgTT/KQzSa X-Received: by 2002:aa7:dd8e:: with SMTP id g14mr1342512edv.208.1595452008768; Wed, 22 Jul 2020 14:06:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595452008; cv=none; d=google.com; s=arc-20160816; b=bdtVqg7FYY3l1TuwnCzhR/HnHI9wgFTEhUUHuSVe0aKr96cK/8VkXGNb3nOBTIZC5D emqVaKMKO93lhF6GOkf7hv1D8tlBNyyWtESFzTk0DLCJsCfX+3ds5bLUbC2SD/5fhOdQ CPvgeZCp4szDcy6iZlrkYKcnv0Mve23rTlwJK2/nmsNmNmPQ6WNR/K5LRPr3djc0pN+J 1iDVenC69Tn5V7R0H0ug3xzHPEWM5MXCW6Bhx7UMF5lGiPRteDfT06wVeJhip5RYsYOL 8LTkdoTNb9J4urSG7ORC4iyWWfX96tWpe33VzCpWmIy/PGKwT+d7HaCrrse6p2eQNeaI 5oLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=pUykGa+mtQ5qLEJzpM6lTm4DyeH44yHQyhTxXONta+M=; b=wmHrl8S9dqfs0AlADISMY6LN96xGB4P5GlFcWGu3883Lx9vUp0m7YTp989RNzp0xeP Q4jMI5JTuqm2rob7pl6vN0oAPIb14daAoiKQM2zQ2QA/pstGrlHLCcdKxezTP6v397VA 2J7kQSxJJXWWI+J5JiklZOdUur6H5o3zCqJDw7Fg87bGS0GwRPMRjx689xJIXKep1v5F EAZhu1m7ENjs5TK9c4hWlKSE1QQtjEXNOThDfwXCvoRS1hhPUcz7Fq/TpnoZxuFsiS+y enBJ4UKBcfjuve4EKUoR7orslJmDavMs7RSBh9UIIycynTu3Y8RJOioGRTSdIoVnP8j7 Dg/A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@atishpatra.org header.s=google header.b=DtMjrfPK; 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 c95si916376edf.304.2020.07.22.14.06.22; Wed, 22 Jul 2020 14:06:48 -0700 (PDT) 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; dkim=pass header.i=@atishpatra.org header.s=google header.b=DtMjrfPK; 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 S1726535AbgGVVGJ (ORCPT + 99 others); Wed, 22 Jul 2020 17:06:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726447AbgGVVGI (ORCPT ); Wed, 22 Jul 2020 17:06:08 -0400 Received: from mail-wm1-x341.google.com (mail-wm1-x341.google.com [IPv6:2a00:1450:4864:20::341]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82317C0619DC for ; Wed, 22 Jul 2020 14:06:08 -0700 (PDT) Received: by mail-wm1-x341.google.com with SMTP id f18so3284623wml.3 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=j59DKc/z7gACmBPZG2UjZXD9dUzbF/kMEA+lox5T8Va8P6RqrP27XzoxFi0lneWaFC 19rA2V/7ARIHO9QyPjxQm2/7AoPgI7XzVtEp/xknCo+ri/MPWdgj7s6qZznWsIJOIZ+g hUGIgBsM6BUKFRng5KwNmDd9Sng+rWmtaOBzqLPqwxXcpAQJOXseXhkaQSUvFBiVxE+3 97Ovqi4bvcoCg6PhcttveHGZXDeOmgM2paGR8Un8JcyZ68HOJn2YUlXKd/dyUb1BOKU8 5lBG0h40rnLhu6TXQOpHDcpiBm/oQgiiSzeZoTNlCCsCW1yfWpV/SGhnAxo/srdIxMBy zYGw== X-Gm-Message-State: AOAM533NIwrOb3DIgaoyY7I1+rJSX7ImRs6Rh+wIdSzhlmMeI/Pc6xVD PUJXIjUBQEWbw6NTgNqvIUc2hzQAm3j/m6ERWxJe 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" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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