lkml.org 
[lkml]   [1996]   [Jul]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH: Ramdisk version 2.0.1
   From: greg@wind.rmcc.com (G.W. Wettstein)
Date: Mon, 1 Jul 1996 12:39:22 CDT

I had a question on a related note. I find the new ramdisk code very
useful but it has been unclear how to make the entity go away
completely? It seems that the ramdisk gets swapped away but I have
never been able to make its consumption of swap space go away.

If the ramdisk is compiled as a module, all of the blocks will be
released when the module is unloaded.

You can also use the ioctl BLKFLSBUF to make the memory pages used by
ramdisk go away. (Note that ramdisk doesn't use swap space; it uses
kernel memory pages.) It's important to remember that BLKFLSBUF on
normal disk devices causes the buffer cache for that device to be
flushed, but they can always be reread in from the device. However,
BLKFLSBUF on a ramdisk makes the data in the ram disk go away
permanently.

We probably should have used a different ioctl, because these two
meanings *are* different, and the results could be quite disastrous if a
program were to call the ioctl expecting one behavior, and it got
another. Fortunately, that ioctl isn't used often by most programs.

- Ted



\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.064 / U:7.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site