Received: by 2002:ac0:946b:0:0:0:0:0 with SMTP id j40csp3655230imj; Tue, 12 Feb 2019 02:25:05 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ/XAT8GtO+6InXoXYF91sHrET+W9hiKwTAGnAjzRgp/e67h0hWh2WNl0Fd3P7okQvglu6j X-Received: by 2002:a62:2a4b:: with SMTP id q72mr3194894pfq.61.1549967105620; Tue, 12 Feb 2019 02:25:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549967105; cv=none; d=google.com; s=arc-20160816; b=AkZCJhPNAgqRpLcTLq/VRt1A//OuP0DdzlS69qlpn0LAnmbLlrQUB+h3tYZy1H0CR8 ptHHD9elLOTiVg4ewEYuh/en1UF3Fb90bbKposxbwwaRmIYlnXm7J1HeGanffsL3gUAa BxifqY0w08guJEP8eaHyNuYnoG7RTg7n5c6VthCeXGPTaeaCeubiDBS9pBtL+ymDNw2r sBCRVni0god2p5Kuc1VkbXxZvpjIPCHBRaHiYNA4iPNUK6nSYidYeSIUmUJVI3Oe+IvA yhU3AqNRM5vtdwxa1slW/exWeRdfZzN35RDu9DdzhFu6izDaHVU+T1MJXbPefff3ayuB Jqbg== 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=7W8G/8FaSOJk9M7YHMfYt+bUiItd3l+RK8BDFjOuhhM=; b=Ss323X4KJ0x+aJHQTec0wgus0XKeIkAfpc3MbhPH0r4vFj4gL0rdnKbOpfXHwY8AlQ 8wEagC7tfAGMvepX8w7ZagCk8ygNrxW2twOUetQIo92Udk2rgptW2FvGDoG4abXeGl1N ShwNBzXsVYlDgncsE5s1MZVFofNf3D76qLnP9fS1sruxZifrIeFWHZ3zXZwLTodQBgql QJE21S7bYUZKQUGiZlyMfwNZcl53az8af5+hOy3OiTjHRT2rzI7C7+KEq6Q79FN6/WRW 46H7v+MmknkhzIbyHXzR76vARI1iM5Vcs5CGcbMa75PLyGIzZ2ka9VMdmP1/JrDQLIZR PffA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=WIfEsyfv; 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 b8si3451648ple.5.2019.02.12.02.24.49; Tue, 12 Feb 2019 02:25:05 -0800 (PST) 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=@brainfault-org.20150623.gappssmtp.com header.s=20150623 header.b=WIfEsyfv; 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 S1728686AbfBLKXf (ORCPT + 99 others); Tue, 12 Feb 2019 05:23:35 -0500 Received: from mail-wr1-f67.google.com ([209.85.221.67]:38969 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728624AbfBLKXe (ORCPT ); Tue, 12 Feb 2019 05:23:34 -0500 Received: by mail-wr1-f67.google.com with SMTP id t27so2030503wra.6 for ; Tue, 12 Feb 2019 02:23:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brainfault-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=7W8G/8FaSOJk9M7YHMfYt+bUiItd3l+RK8BDFjOuhhM=; b=WIfEsyfvAQS08gsNmMtnHMcv70Li+F9ZXFAafM6QykN3Gdm2PFkAO6YR2wEFpGLXE6 4Zno41jwiiocRF91A8WKY4PslqX3MyWFTdzUHGrddos/ekqQ14yMEAWXRV9lRyotx2Qo Y+aOop1/iC5p8pblhWMtr8zIWoxl1ACFyMELp/2Zy4mT35xuyqgYyPfsaDZSM5extvm/ QwOExDWW2w2G9YPwy5/2s64+Ng7/ZEwYc6A/ZcYLdPG9qy/FEy18ZcUbvPdXkyqxaBQ3 rHph/51Iy9aaGZm+PeO1Uans3WhW76dD8HTwe6HLWZ2x+EiHa6hZDviC4EPytVa39jvr eU3w== 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=7W8G/8FaSOJk9M7YHMfYt+bUiItd3l+RK8BDFjOuhhM=; b=HJCzRtqwYeXPi4wbvtQr7Fj+1iEuEhTYA7QGnbV9/ztnldUqhEi07HKT+P2670eNsk r4Fijix3T1DG12n2ORi0r/Wo/wwJftQD+q+8OYPlZPHmlxfdGVMTQ60NJ21xYh8UkjA8 MOmRKjX67T2FSwP5Y3r0C4CoCrS9wUtN3VjUN188P1qpJY3LhaEYrlC9Jz0R6QgW8gwD PVgvmGAy1eP2gjCp2IGZ3ojq4dexoYHoBr5/bL9i5m//y3wRx7HY5HkKbOPGKqqkjJu8 XM2jzwG7olSc/nUhinBeCSYQRrBN3c/3LLVA+zBCT4MkNzJljhp664RpUA7EPTB1wVhr W08A== X-Gm-Message-State: AHQUAubY/52YJDGlNZgOrLrsqs+eQ5qSx99YoNMx0PznUIW+nU2nTRX9 mViMgXUqnw5HGGDvIeY2/O5HDw6naWKHfUVs8LPciQ== X-Received: by 2002:adf:ee07:: with SMTP id y7mr2333442wrn.187.1549967012363; Tue, 12 Feb 2019 02:23:32 -0800 (PST) MIME-Version: 1.0 References: <20190119132650.9978-1-anup.patel@wdc.com> <20190119132650.9978-7-anup.patel@wdc.com> <20190212070807.GD26747@infradead.org> In-Reply-To: <20190212070807.GD26747@infradead.org> From: Anup Patel Date: Tue, 12 Feb 2019 15:53:21 +0530 Message-ID: Subject: Re: [PATCH v2 6/6] RISC-V: Implement keepinitrd kernel parameter To: Christoph Hellwig Cc: Anup Patel , Palmer Dabbelt , Albert Ou , "linux-kernel@vger.kernel.org" , Atish Patra , Paul Walmsley , "linux-riscv@lists.infradead.org" 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 Tue, Feb 12, 2019 at 12:38 PM Christoph Hellwig wrote: > > On Sat, Jan 19, 2019 at 01:28:59PM +0000, Anup Patel wrote: > > This patch implements keepinitrd kernel parameter. By default, > > keepinitrd=1 but users can pass "keepinitrd=0" to free-up > > initrd memory at boot-time in free_initrd_mem() function. > > > > The keepinitrd kernel parameter is already implemented by > > unicore32, arm, and arm64 architectures and it is documented > > at: Documentation/admin-guide/kernel-parameters.txt > > But why do we need it? Is there any good reason every not to free > the initrd / initramfs memory when it is not used? If it is initramfs (i.e. CPIO image) then contents of CPIO archive are extracted to create a ramfs instance. If it is initrd (i.e. some filesystem image) then RAM block device is created in-place at initrd location. (Please correct me if I am wrong about initrd here). So in case of initrd we might not want to free-up the RAM but we can certainly free-up in case of initramfs. Regards, Anup