Received: by 2002:ac0:bc90:0:0:0:0:0 with SMTP id a16csp565731img; Mon, 18 Mar 2019 09:14:38 -0700 (PDT) X-Google-Smtp-Source: APXvYqwJUJebfTlryHKRVmV5XtL5mpgw4jjtWKZi8Jlgi31sr2UeKs867bCx3oQjAfFCr53mwz/F X-Received: by 2002:a65:6651:: with SMTP id z17mr17474519pgv.95.1552925678516; Mon, 18 Mar 2019 09:14:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552925678; cv=none; d=google.com; s=arc-20160816; b=sZPEYcZbjRn2N57p4x3UVLjGqHBtzxl2ZmlgI78IQUHbqI0i32AtJjSZGIFbdv/H4b HDKrTqovu1FCelL8qvRus6syuWPAM5xbGalQYGHTLUrEPbrq5sqtMz5gqmupTix5C5Dm x0smyhnjxiQ9GO8aGE7CZwroskzMbAzykDLBuyTB7wiSEwCWK9zvT9dkfKIJILILZ9kR mHGCuTUrEW6Fvj2SO8uovvjDAxWxuCdzL48nXl5YbgK2GRC3fJ6tpGH3tfJhaGb19gCV tE2EeztG8HZAMEWNPMsBdPiOpre4bNvb51IAWbEvFX0zt7JyCZ40IEqCo22fq8VS9jDt tC/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature; bh=IraHUDTEtuXM/Ec1wSzEQgIe4yar1F8UWczeCKwsQg4=; b=DITuQ48xK4BtTRaXUFqFlhANncbwP79HlfpCPUKmgQbiESOiloVuEHDisThplniSaS Tf5MRj8vzC6CVuWzNwAN2QNGvHE4JNW8Oll2WtdWJWkGPYMn7TNnONhKIDEIvQLK+NYT vJ5+naXs7B4XykosQrsMGfh3ZgB/DsmZj+2zEvCVvkLhV1nEfxPI1Cs+ZsIL+Qe9AJIQ B4Jupip2QKLyzr2SSFyEUmDcE9NvxSbY7/iy2nYOcVI4HsZNrhtm7E1hCslTLTeCeEll QT3gcUfGtmDJ5WXzlPZtSj2YOtks5dwjTZCaVSyYYzAmAxAeLY07NOy6jik+bIt7+k95 BIsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sifive.com header.s=google header.b=nw5HVSyW; 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 p11si3215607pgl.526.2019.03.18.09.14.22; Mon, 18 Mar 2019 09:14:38 -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=pass header.i=@sifive.com header.s=google header.b=nw5HVSyW; 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 S1727555AbfCRQM6 (ORCPT + 99 others); Mon, 18 Mar 2019 12:12:58 -0400 Received: from mail-it1-f195.google.com ([209.85.166.195]:51596 "EHLO mail-it1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726663AbfCRQM5 (ORCPT ); Mon, 18 Mar 2019 12:12:57 -0400 Received: by mail-it1-f195.google.com with SMTP id e24so21327876itl.1 for ; Mon, 18 Mar 2019 09:12:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sifive.com; s=google; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=IraHUDTEtuXM/Ec1wSzEQgIe4yar1F8UWczeCKwsQg4=; b=nw5HVSyWNFxDeDlw6HKZJe0Npjv72G/WEgGt4HElzn8bUnoYiTtHLwzuArWkMoGNht jeAnwGk8UmUyxwO3kLlz15QsEAHVyG/VUvU2LWZNvLj3GZUUAF4GEfnlc4s53vVGnzdu i8oqwb6C8Xw8VYMfuJ15vjeqoSX8fuvueIb/YvBmBefM7Yc6jiGlpLwnjh2wPWB9sTy9 Vv95Vig58teA3BwjOFtP7m7oB3jObTW+lggIakvo1qIzL9cvbQtT7SuyW8/Y0NHsipur fCepMQjNkDEM86BpnL7wkyjrYHtEfSasDPCL8QZhxyv8ERk1HzEB+ayG9J9MJA72HzZE yDsg== 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:in-reply-to:message-id :references:user-agent:mime-version; bh=IraHUDTEtuXM/Ec1wSzEQgIe4yar1F8UWczeCKwsQg4=; b=laEbhv/MKjcvQamBxL0eiZ1qjeGvvImqFW+2NF1v+jY+dXIoYFWKfXpUOXjA0brhbi /ra/gLBvuMK1KaAGvBndn0vXGIYKJxy7A23kpXSrgVuqeEbmGAQ7xtzrGAWRZCGXNhxr 7i5A/mm5QV+dXNzuUvq6zMj6LvrJG1VJoQzeAJNqJccAItqsZuZgmZLAk/L1jo1kXLRO Uy9kVl69ADbp8dALLWGF8nH2kBD91NrFvZ/j+EODDRgbJSM/4P7iuLvLHUhv/w78or6S 0E5N6nNpLSnnOqAzw9JgmtRTrPNmho/5/hbDPRq+IiUBQRQu39ruZvMnRSfvAVCGlROz UGBg== X-Gm-Message-State: APjAAAV+LFMgUAKQFVHRQAFsknIa9MQWlQvymmTGpMy9wA4Mx/Y3raKK wW5Yp5UEbIdCj9N49apyhO45Pg== X-Received: by 2002:a02:8c3:: with SMTP id 186mr11964145jac.69.1552925576491; Mon, 18 Mar 2019 09:12:56 -0700 (PDT) Received: from localhost (c-73-95-159-87.hsd1.co.comcast.net. [73.95.159.87]) by smtp.gmail.com with ESMTPSA id a77sm311450itc.5.2019.03.18.09.12.55 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 18 Mar 2019 09:12:55 -0700 (PDT) Date: Mon, 18 Mar 2019 09:12:55 -0700 (PDT) From: Paul Walmsley X-X-Sender: paulw@viisi.sifive.com To: Mike Rapoport cc: Anup Patel , Anup Patel , Palmer Dabbelt , Albert Ou , Atish Patra , Paul Walmsley , Christoph Hellwig , "linux-riscv@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 3/3] RISC-V: Allow booting kernel from any 4KB aligned address In-Reply-To: <20190318071829.GF21385@rapoport-lnx> Message-ID: References: <20190312220752.128141-1-anup.patel@wdc.com> <20190312220752.128141-4-anup.patel@wdc.com> <20190313183121.GB28630@rapoport-lnx> <20190314065311.GC24380@rapoport-lnx> <20190315155828.GB920@rapoport-lnx> <20190318071829.GF21385@rapoport-lnx> User-Agent: Alpine 2.21.9999 (DEB 301 2018-08-15) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 18 Mar 2019, Mike Rapoport wrote: > On Sat, Mar 16, 2019 at 04:55:30AM +0530, Anup Patel wrote: > > > We started exploring ways to re-claim memory below kernel because > > we are trying to get Linux working on Kendryte K210 board > > (https://kendryte.com/). This board has dual-core 64bit RISC-V but it > > only has 8MB RAM. > > Huh, 8MB of RAM is tough... > > It is possible to use the memory below the kernel, e.g x86-64 does that. > But it is definitely a separate change and with such RAM diet using 4K > pages seems unavoidable. > > I still have concern about using 4K pages whenever the load address is not > 2M (4M) aligned. People tend to not pay enough attention to such details > and they would load the kernel at an arbitrary address and get the > performance hit. > > I think the default should remain as is and the ability to map the kernel > with 4K pages (and use 4K aligned load address) should be a Kconfig option. Agreed. That Kconfig parameter should also be default-off. Only a small number of people will try to run RISC-V Linux on a Kendryte board. That niche use-case shouldn't impact the much larger group of people who will run Linux on more reasonably-sized systems. No one should need to ask people to report their kernel load address whenever someone reports a performance regression. - Paul