[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MN2PR04MB60615E8737B56B1B213B5FA58D660@MN2PR04MB6061.namprd04.prod.outlook.com>
Date: Wed, 13 Feb 2019 03:43:06 +0000
From: Anup Patel <Anup.Patel@....com>
To: Christoph Hellwig <hch@...radead.org>,
Anup Patel <anup@...infault.org>
CC: Palmer Dabbelt <palmer@...ive.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Atish Patra <Atish.Patra@....com>,
Albert Ou <aou@...s.berkeley.edu>,
Paul Walmsley <paul.walmsley@...ive.com>,
"linux-riscv@...ts.infradead.org" <linux-riscv@...ts.infradead.org>
Subject: RE: [PATCH v2 6/6] RISC-V: Implement keepinitrd kernel parameter
> -----Original Message-----
> From: linux-kernel-owner@...r.kernel.org [mailto:linux-kernel-
> owner@...r.kernel.org] On Behalf Of Christoph Hellwig
> Sent: Wednesday, February 13, 2019 12:15 AM
> To: Anup Patel <anup@...infault.org>
> Cc: Christoph Hellwig <hch@...radead.org>; Palmer Dabbelt
> <palmer@...ive.com>; Anup Patel <Anup.Patel@....com>; linux-
> kernel@...r.kernel.org; Atish Patra <Atish.Patra@....com>; Albert Ou
> <aou@...s.berkeley.edu>; Paul Walmsley <paul.walmsley@...ive.com>;
> linux-riscv@...ts.infradead.org
> Subject: Re: [PATCH v2 6/6] RISC-V: Implement keepinitrd kernel parameter
>
> On Tue, Feb 12, 2019 at 03:53:21PM +0530, Anup Patel wrote:
> > 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).
>
> No. If it is an initrd image we still copy it into the rootfs first, and then load it
> into a ram disk. Take a look at
> init/initramfs.c:populate_rootfs() and
> init/do_mounts_initrd.c:initrd_load().
>
> > So in case of initrd we might not want to free-up the RAM but we can
> > certainly free-up in case of initramfs.
>
> No, in either case we do not need the original initramfs/initrd memory. I
> suspect arm has this as a workaround for some weird legacy boot issue, but I
> can't see any reason why we would not want to free the memory on riscv.
Sure, the keepinitrd=0 by default so it will always free-up initrd by default.
Please look at v3 patchset.
Of course, we need separate patch to update documentation of keepinitrd.
Regards,
Anup
Powered by blists - more mailing lists