public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	"Daniel M. Weeks" <dan@danweeks.net>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] initramfs: Support initrd that is bigger then 2G.
Date: Thu, 19 Jun 2014 22:07:03 -0700	[thread overview]
Message-ID: <53A3C177.1000905@zytor.com> (raw)
In-Reply-To: <CAE9FiQXRWR8vWFZEsuoGMbe1mZL72QWyjWfNt13o0+Q9bgHJfg@mail.gmail.com>

On 06/19/2014 10:02 PM, Yinghai Lu wrote:
> On Thu, Jun 19, 2014 at 9:29 PM, H. Peter Anvin <hpa@zytor.com> wrote:
>> On 06/19/2014 07:12 PM, Yinghai Lu wrote:
>>>
>>> Also need to use that in write_buffer path for cpio that have file is
>>> more than file.
>>
>> That sentence doesn't make sense.
> 
> I mean this path:
>    unpack_to_rootfs  ===> write_buffer ===> actions[].../do_copy
> and image is uncompressed cpio, and there is one big file (>2G) in that cpio.

Don't tell me, make the description clear so someone can understand it
10 years from now.
>>
>> It would be nice in order to support very large initrd/initramfs, to
>> free the memory as it becomes available instead of requiring two copies
>> of the data in memory at the same time.
> 
> for initramfs, it is from ramdisk_image/ramdisk_size to tmpfs directly.
> and ramdisk_image/ramdisk_size get freed.
> 
> for initrd, it is transferred to /initrd.image in tmpfs at first, and
> ramdisk_image/ramdisk_size
> get freed,  at last /initrd.image is decompressed/copied to /dev/ram0
> and get removed
> from tempfs.
> 
> So what do you mean "free the memory"?
> 

For each of those transfers, we don't free the source memory until the
very end.  We could free that memory as we process the input, requiring
less total memory.

	-hpa



  reply	other threads:[~2014-06-20  5:07 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-20  2:12 [PATCH] initramfs: Support initrd that is bigger then 2G Yinghai Lu
2014-06-20  4:29 ` H. Peter Anvin
2014-06-20  5:02   ` Yinghai Lu
2014-06-20  5:07     ` H. Peter Anvin [this message]
2014-06-20 16:03       ` Yinghai Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53A3C177.1000905@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=dan@danweeks.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=yinghai@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox