public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Padraig Brady <padraig@antefacto.com>
To: linux-kernel@vger.kernel.org
Subject: ramdisk size clarification
Date: Mon, 17 Dec 2001 20:41:32 +0000	[thread overview]
Message-ID: <3C1E587C.9060300@antefacto.com> (raw)

It's not at all obvious to me what the {ramdisk,ramdisk_size,rd_size}
parameters for ramdisks do from reading ramdisk.txt (note rd_size
is used when using the ramdisk as a module).

I think they only set the size to be reported, for e.g. mke2fs does
the following to determine the size of a ramdisk:

open("/dev/ram0", O_RDONLY|O_LARGEFILE) = 3
ioctl(3, BLKGETSIZE, 0xbffff81c)        = 0
close(3)                                = 0

However there is no actual RAM allocated until it's required,
and also there is no upper limit on the amount of RAM used,
so the following will kill your system (well it did for me):
dd if=/dev/zero of=/dev/ram0

can this be clarified in the ramdisk.txt file please.

As a side note there is a lovely "trivial ramdisk" module
written by Andrw tridgell @:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/gkernel/ext3/tools/trd/
that does static allocation and (hence) doesn't grow beyond the
specified size.

thanks,
Padraig.


             reply	other threads:[~2001-12-17 20:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-17 20:41 Padraig Brady [this message]
2001-12-17 21:14 ` ramdisk size clarification Mike Castle
2001-12-18 12:46   ` Padraig Brady

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=3C1E587C.9060300@antefacto.com \
    --to=padraig@antefacto.com \
    --cc=linux-kernel@vger.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