Received: by 2002:a25:868d:0:0:0:0:0 with SMTP id z13csp1338207ybk; Thu, 14 May 2020 06:38:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOtRpQtrWi/8cVqR5Kt/mW81el4oxVw+SXHQ2cJkXMSSXj/BhmFt7EXIPXlMu8fgnFPAP0 X-Received: by 2002:a17:906:398:: with SMTP id b24mr4060955eja.356.1589463501633; Thu, 14 May 2020 06:38:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1589463501; cv=none; d=google.com; s=arc-20160816; b=Zy3fSqBBbr5TTvFQigH8ghB8qwWkDBAhsBfyI6nY1SnbzOAfhFnSDHfXKzEaN2P8c1 pcxyLXS2YxKm30jR/NOcMjjkW91iZC7wFHCLWQbtEcREx9qjMVVjkYZIIZ0ABXJBHza/ 2oUgZWwBhpJpBv29Zny1KbrgmwuQsEvwQ1oH+X8w0CLApUAaPazXNFuUpnYX9lke46Oj qv+tpS6sVhO6XaZJdktP0T6igK//BF2JeLW9Cj5RAM+aj6/QTJq/YpFUX/8J3U9L1yOA ejdEcrs9ojvo3pbaPy5tqfCrdS+5Cz5aRAsC5qgCcU8J1yOVrpjny5Oj4KHiuAJP9k9N rpMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=dFH4YBbehMI5t5iqf9Q3qC3HSqGhIHfBCfuP+cdahd4=; b=cIrPQlU2ST3ASWvpep9ZEmME2S26duEs7BYxzojmK4mgUkpWxEVznEmSlNNt32bzvr kB0rX7KZ4zjVxDVf5RsazcNqloZvkR9bisBRMvCXDdI2mY3fWzWrtMkMd1INr7n2HSQz RvsINREYWPbtqNop2X0hCMwTCRpD1zLiA1bIwKDeadDnES2NzwDWxDFF35DC0939moM2 yfkheMEVFEUNRa+0vSD6bVnsXBAG2TRGPEnnndMXN5O59aSzLGsH4cAWKBjwgTBdIRvw ldsMyon5PigsDb/P0tvgzrQ2x94SCXFdUx95dvO0dHf9Spl7uFyZb14sWH6TXgAZVccb c5bA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=QMSW1I6g; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c4si1634322ejm.465.2020.05.14.06.37.58; Thu, 14 May 2020 06:38:21 -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=@gmail.com header.s=20161025 header.b=QMSW1I6g; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726140AbgENNfv (ORCPT + 99 others); Thu, 14 May 2020 09:35:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726037AbgENNfu (ORCPT ); Thu, 14 May 2020 09:35:50 -0400 Received: from mail-pg1-x543.google.com (mail-pg1-x543.google.com [IPv6:2607:f8b0:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84A23C061A0C for ; Thu, 14 May 2020 06:35:49 -0700 (PDT) Received: by mail-pg1-x543.google.com with SMTP id p21so1240711pgm.13 for ; Thu, 14 May 2020 06:35:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=dFH4YBbehMI5t5iqf9Q3qC3HSqGhIHfBCfuP+cdahd4=; b=QMSW1I6g69BXV603QaMHpeUSgDh97tVPbW+aOr8TNB1DROgfixI7vPwvLqnPQftRbu k/DPWZZCyDkAqkGMyKxaCuU0auNG8u3VNTsYoKg9i/6TfyufPw31JBq/HqrXhlY25q1O FEoyvdlBEbpmE+R9iw2Bk2PDZdoUDuaBcRV4+4KZrgKr2IdlZWue1/hOrdi/XGwFUh+L myzCQVsNAZHA17H/eqiUz6s17fy9GI9NvsMmjq2Mrnegh2/CXKfNxpd76zfde3+2XF4Y 9GlNZqEtCWPbdJmgW+qw8QzMoUZgkAfkbH8Vqoah21hxzL4zQOTpotm6U+rO26/XhNZe cxTQ== 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=dFH4YBbehMI5t5iqf9Q3qC3HSqGhIHfBCfuP+cdahd4=; b=U85Ahm6YsM/ZMxh6SQo/RnaLUaNWUXArzp63gwVwqlUSK2KxK4ZG2frXArO/6CBR// 3Xybk+gvyc3Uv6GqQEmxlq+CRpy7IhIGL6gaTS1izDYRKFBRdCzyJN8cnAedaGkP9PMp YxGdc3cD46flrXgPTr3mya5hWkEzOAcT21MTKXS4hRdtAGVW5mxTK4wmYONJobqdDc93 Rn4CyNt3zHeZBjGx1sufSF5aFhxfMnwnBfqWmKJn4UvSvoJbmGl/952qfoPV7DrDZD5u gbYPERgmvoS49GWNxNDfmN1+E330XuSrNndA8EY10nzGDYvPRj0nmDi8ySpvlFRk2BPS NziA== X-Gm-Message-State: AOAM5329k/MYZXjdkiC8hvcBQHZC1snAJJeynWyLRvYi/wzinzSeFL5H y1EQzrm8CH+v7pWLt+UhG08K93Rw X-Received: by 2002:a62:ab16:: with SMTP id p22mr4250043pff.216.1589463348447; Thu, 14 May 2020 06:35:48 -0700 (PDT) Received: from localhost ([49.207.51.148]) by smtp.gmail.com with ESMTPSA id gb6sm4426799pjb.56.2020.05.14.06.35.47 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 14 May 2020 06:35:47 -0700 (PDT) Date: Thu, 14 May 2020 19:05:45 +0530 From: afzal mohammed To: Arnd Bergmann Cc: Russell King , Linux ARM , "linux-kernel@vger.kernel.org" Subject: Re: ARM: static kernel in vmalloc space Message-ID: <20200514133545.GA5020@afzalpc> References: <20200503145017.GA5074@afzalpc> <20200504091018.GA24897@afzalpc> <20200511142113.GA31707@afzalpc> <20200512104758.GA12980@afzalpc> <20200514111755.GA4997@afzalpc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Thu, May 14, 2020 at 02:41:11PM +0200, Arnd Bergmann wrote: > On Thu, May 14, 2020 at 1:18 PM afzal mohammed wrote: > > 1. SoC w/ LPAE > > 2. TTBR1 (top 256MB) for static kernel, modules, io mappings, vmalloc, > > kmap, fixmap & vectors > Right, these kind of go together because pre-LPAE cannot do the > same TTBR1 split, and they more frequently have conflicting > static mappings. > > It's clearly possible to do something very similar for older chips > (v6 or v7 without LPAE, possibly even v5), it just gets harder > while providing less benefit. Yes, lets have it only for LPAE > > 3. TTBR0 (low 3768MB) for user space & lowmem (kernel lowmem to have > hardcoded 3840/256 split is likely the best compromise of all the hmm,i swallowed 72MB ;) > > 4. for user space to/from copy > > a. pin user pages > > b. kmap user page (can't corresponding lowmem be used instead ?) > - In the long run, there is no need for kmap()/kmap_atomic() after > highmem gets removed from the kernel, but for the next few years > we should still assume that highmem can be used, in order to support > systems like the 8GB highbank, armadaxp, keystone2 or virtual > machines. For lowmem pages (i.e. all pages when highmem is > disabled), kmap_atomic() falls back to page_address() anyway, > so there is no much overhead. Here i have some confusion - iiuc, VMSPLIT_4G_4G is meant to help platforms having RAM > 768M and <= 4GB disable high memory and still be able to access full RAM, so high memory shouldn't come into picture, right ?. And for the above platforms it can continue current VMPSLIT option (the default 3G/1G), no ?, as VMSPLIT_4G_4G can't help complete 8G to be accessible from lowmem. So if we make VMSPLIT_4G_4G, depends on !HIGH_MEMORY (w/ mention of caveat in Kconfig help that this is meant for platforms w/ <=4GB), then we can do copy_{from,to}_user the same way currently do, and no need to do the user page pinning & kmap, right ? Only problem i see is Kernel compiled w/ VMSPLIT_4G_4G not suitable for >4GB machines, but anyway iiuc, it is was not meant for those machines. And it is not going to affect our current multiplatform setup as LPAE is not defined in multi_v7. Regards afzal