mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marc Ballarin <Ballarin.Marc@gmx.de>
To: Mike Mohr <akihana@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Reclaim space from unused ramdisk?
Date: Wed, 27 Jul 2005 01:21:14 +0200	[thread overview]
Message-ID: <20050727012114.59a33298.Ballarin.Marc@gmx.de> (raw)
In-Reply-To: <4746469c05072615167ca234ce@mail.gmail.com>

On Tue, 26 Jul 2005 15:16:58 -0700
Mike Mohr <akihana@gmail.com> wrote:

> I wonder if it would be possible to somehow reclaim space that has
> been previously reserved for a ramdisk without rebooting.  I read the
> ramdisk docs in the latest kernel source and it seems that it is not
> currently possible.  However, the kernel keeps track of the memory
> allocated for said ramdisks; would it not be possible with root (or
> even kernel) permissions to remove the flag that prevents the VM
> subsystem from reclaiming that space?  I realize that rot permissions
> may not be high enough.  In that case, could a module be written that
> takes a device name as a parameter then uses it to look up the
> reserved memory that device uses, then resets the necessary flag and
> finally unloads itself?  It would have to check that the filesystem
> was unmounted, of course.
> 
> How difficult would this be to write?

Hi,

ramfs (always there) and tmpfs (optional) already do this.
tmpfs can be swapped out, ramfs always uses physical memory.

mount -t ramfs none /mnt/blah
mount -t tmpfs none /mnt/blah

Regards

  reply	other threads:[~2005-07-26 23:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26 22:16 Mike Mohr
2005-07-26 23:21 ` Marc Ballarin [this message]
2005-07-27  6:25 ` Jan Engelhardt
2005-07-27  6:56   ` Andrew Morton
2005-07-27  7:52     ` Jan Engelhardt
2005-07-27  7:55       ` Andrew Morton
2005-07-27  8:28         ` Jan Engelhardt
2005-07-27  9:04           ` Jan Engelhardt

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=20050727012114.59a33298.Ballarin.Marc@gmx.de \
    --to=ballarin.marc@gmx.de \
    --cc=akihana@gmail.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

all inboxes | Powered by JetHome®