Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp5008319ybh; Tue, 6 Aug 2019 22:43:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqw9LMEfAEE8HmVopCX/kTCuuMTsiUcsvhyvC0gZQV+ecyET9PqpUqfEyKG0c2+vHOBNPv6C X-Received: by 2002:a62:8246:: with SMTP id w67mr7776306pfd.226.1565156617340; Tue, 06 Aug 2019 22:43:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565156617; cv=none; d=google.com; s=arc-20160816; b=JK+wo03seJK4vVsUpP9iizXf5rqDVRebR8OJ/GjGef1dUIWg7NEZ4hSgIgbAf2Sb0/ B13bpmKlgncQXoApDzTec/TIdV38GZY3jFliueZNtFhdcEPvTVK3I7NBqUWLxHq5ro1T RujTpIbs6nHbv2ans/pjp75jSFbUbR5vA/vpDUURxGR+ZlbGtjTX2Hpq97PGFyzoMNYl vxfoxoSqxRH1FldgpUM7+lL8hRaAcIsZNVDoY0kl8PCs2x6iDTZCdFAA2yLbJ5icHPgT bDt3rsFnaTD4h3Thftmawox2RXCHxsyv3oz9WOvtupJM+VHb1K3P+gIG9ZHhZr3att10 fgGA== 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=yZWIGwD45qaQCTjIISsahFCcEdFYVcGpIOjQahUL7O0=; b=rJ+LfQWuc9dfYUf8XSsZL4UZGJcDvuq4RmhcwFTlZctghyWuInm+XErw5CcXRiQzXe fArn+73mubAEps2ZNbS1Lmjwf42nWUzVsp64E2Jc8WI1OhsvYPlA6fZTe93X4guHvyxb kVxJbRaFn/MenzLiI6BDEOCPBMvMO1lpv5KyUomhb+pIQA3Lw6bz69T5KsFhFGsje/a/ yCeJdaitnYqIoZ7xVFAJ0qxHr+cE6/YPKMZLwxj/wX3UENJNa+TO02Z6XvW7PCPl28Qy JzrY8HWAZsM9hrjPgslceUCx52h5Y9ENrEnMobB8NoEZ3TPafuXWol4VBDipKaoUZaG8 hcmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SXgLtFQJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c11si17463939pjq.0.2019.08.06.22.43.22; Tue, 06 Aug 2019 22:43:37 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=SXgLtFQJ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726647AbfHGFmr (ORCPT + 99 others); Wed, 7 Aug 2019 01:42:47 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:34760 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726258AbfHGFmq (ORCPT ); Wed, 7 Aug 2019 01:42:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=yZWIGwD45qaQCTjIISsahFCcEdFYVcGpIOjQahUL7O0=; b=SXgLtFQJoFlctH/cb3yg1ES6z zDO5haCp9wf+i9WoU5MSK0tknTzCq6i4CeLM/kEi5pwmz4n8HGlYTiWJM7iUzlUwgLbw5KAVDKq9s yk4PjAc83Q/0xZoeYq40FppnUWJNk56PpX3LDPDLHHSlg+mYQVQ67GOX1kFtn5lQ7/n1WurgiWveK GkmCYgjVeLcwKwRap5RTKcopYMn/cJEadzp976WF+jdU74to9+BDlYcn8Wcu8cDbGBWzD21Fmxkdd qcKuPCcgAFwNeJbYS5i/1x+cJ7CrBqByukUtKa3V52Qys7xtyBSKcUTGV0+xlymzU6LJJ81eIvXZx QcakcU0uQ==; Received: from hch by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hvEik-0002Bp-3E; Wed, 07 Aug 2019 05:42:46 +0000 Date: Tue, 6 Aug 2019 22:42:46 -0700 From: Christoph Hellwig To: Paul Walmsley Cc: Christoph Hellwig , linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, Alexandre Ghiti Subject: Re: [PATCH] riscv: kbuild: add virtual memory system selection Message-ID: <20190807054246.GB1398@infradead.org> References: <20190802084453.GA1410@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.4 (2019-03-13) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 06, 2019 at 05:02:03PM -0700, Paul Walmsley wrote: > The rationale is to encourage others to start laying the groundwork for > future Sv48 support. The immediate trigger for it was Alex's mmap > randomization support patch series, which needs to set some Kconfig > options differently depending on the selection of Sv32/39/48. Writing a formal todo list is much better encouragement than adding dead code. Th latter has a tendency of lingering around forever and actually hurting people. > > > but actively harmful, which is even worse. > > Reflecting on this assertion, the only case that I could come up with is > that randconfig or allyesconfig build testing could fail. Is this the > case that you're thinking of, or is there a different one? If that's the > one, I do agree that it would be best to avoid this case, and it looks > like there's no obvious way to work around that issue. randconfig or just a user thinking bigger is better and picking it. > > Even if we assume we want to implement Sv48 eventually (which seems > > to be a bit off), we need to make this a runtime choice and not a > > compile time one to not balloon the number of configs that distributions > > (and kernel developers) need to support. > > The expectation is that kernels that support multiple virtual memory > system modes at runtime will probably incur either a performance or a > memory layout penalty for doing so. So performance-sensitive embedded > applications will select only the model that they use, while distribution > kernels will likely take the performance hit for broader single-kernel > support. Even if we want to support Sv39 only or Sv39+Sv39 the choice in the patch doesn't make any sense. So better do the whole thing when its ready than doing false "groundwork".