linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* can't get buffer cache to flush with /dev/ram with 2.4.4 using "update"/"sync"
@ 2001-08-04 17:14 Floydsmith
  0 siblings, 0 replies; 3+ messages in thread
From: Floydsmith @ 2001-08-04 17:14 UTC (permalink / raw)
  To: linux-kernel; +Cc: Floydsmith

Sorry for the repeat - the kernel I am running is 2.4.4 (not 2.2.4 as 
reported originally) - also, this problem does occur with 2.2.18.

Hello all,

I boot linux using "loadlin" with an "initrd" ram disk image ("minix" type 
fs) of size 32 Meg with kernel 2.4.4. The /linuxrc (a C executable) runs and 
it shows that the mounted file sysem is of proper type and size. Then my 
"linuxrc" extracts a "tar" achrive (to populate the mounted /dev/ram [on 
"/"]) with a small subset of  "linux" about (18 Meg) (as a "rescue" floppy 
boot). Before the "extract", debug code shows that the "cached" entry in 
"/proc/meminfo" to be practically zero (and thus plenty of "freemem"). 
However, after the "extract", the "cached" line shows about "18Meg"  and I 
can find nothing that works to "flush" it. I have tried "spawing" 
"/sbin/update" and waiting several min. and running "/bin/sync" and also 
waiting - no change in the "cahed" entry (or and increase in the "freemem").  
(ps -ef shows a process "bdflush" running [spawned] on its own.) Thus, trying 
to bring up a "logon" shell (and its "init" scripts) results in that process 
being killed do to lack of "freemem". I have only 64M and less than 4 Meg 
free after the "extract". Any suggestions greatly appreciated in advance. If 
there any "syscall" I can make in "linuxrc" that will flush "all" buffers 
without knowing anything like "file descriptors"? Is this "syscall" 
"synchronus" - or do do I have wait several seconds for it to work?

Floyd,

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: can't get buffer cache to flush with /dev/ram with 2.4.4 using "update"/"sync"
  2001-08-09 17:45 Floydsmith
@ 2001-08-09 18:06 ` Andreas Dilger
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Dilger @ 2001-08-09 18:06 UTC (permalink / raw)
  To: Floydsmith; +Cc: linux-kernel

Floyd Smith writes:
> I boot linux using "loadlin" with an "initrd" ram disk image ("minix" type 
> fs) of size 32 Meg with kernel 2.4.4. The /linuxrc (a C executable) runs and 
> it shows that the mounted file sysem is of proper type and size. Then my 
> "linuxrc" extracts a "tar" achrive (to populate the mounted /dev/ram [on 
> "/"]) with a small subset of  "linux" about (18 Meg) (as a "rescue" floppy 
> boot). Before the "extract", debug code shows that the "cached" entry in 
> "/proc/meminfo" to be practically zero (and thus plenty of "freemem"). 
> However, after the "extract", the "cached" line shows about "18Meg"  and I 
> can find nothing that works to "flush" it. I have tried "spawing" 
> "/sbin/update" and waiting several min. and running "/bin/sync" and also 
> waiting - no change in the "cahed" entry (or and increase in the "freemem").  
> (ps -ef shows a process "bdflush" running [spawned] on its own.) Thus, trying 
> to bring up a "logon" shell (and its "init" scripts) results in that process 
> being killed do to lack of "freemem". I have only 64M and less than 4 Meg 
> free after the "extract". Any suggestions greatly appreciated in advance. If 
> there any "syscall" I can make in "linuxrc" that will flush "all" buffers 
> without knowing anything like "file descriptors"? Is this "syscall" 
> "synchronus" - or do do I have wait several seconds for it to work?

I would "suggest" that the "cache" has nothing to do with the "problem".
It is just a "cache", and _should_ be "released" when it is not needed.
However, the "ramdisk" is using up a fair amount of "memory", and your
"initrd" is using up "memory" as well.  This "adds up" to about "50MB"
right there.  Maybe you need to make a "smaller" "initrd" or use "ramfs"
instead of "ramdisk" so you don't "waste" ram on the "empty" part of the
"filesystem" from the "tar".  You may also want to use a smaller "shell"
like "ash" for limited boot environments, or even something like "Tom's
Root Boot" which is "very small" to start with.

That said, there were "problems" in older "kernels" with respect to the
"VM subsystem", so you are best off using "2.4.8-pre8" or whatever is the
most recent "kernel" (or even the next one, which has yet more fixes).

Cheers, Andreas
-- 
Andreas Dilger  \ "If a man ate a pound of pasta and a pound of antipasto,
                 \  would they cancel out, leaving him still hungry?"
http://www-mddsp.enel.ucalgary.ca/People/adilger/               -- Dogbert


^ permalink raw reply	[flat|nested] 3+ messages in thread

* can't get buffer cache to flush with /dev/ram with 2.4.4 using "update"/"sync"
@ 2001-08-09 17:45 Floydsmith
  2001-08-09 18:06 ` Andreas Dilger
  0 siblings, 1 reply; 3+ messages in thread
From: Floydsmith @ 2001-08-09 17:45 UTC (permalink / raw)
  To: linux-kernel; +Cc: Floydsmith

Hello all,

I boot linux using "loadlin" with an "initrd" ram disk image ("minix" type 
fs) of size 32 Meg with kernel 2.4.4. The /linuxrc (a C executable) runs and 
it shows that the mounted file sysem is of proper type and size. Then my 
"linuxrc" extracts a "tar" achrive (to populate the mounted /dev/ram [on 
"/"]) with a small subset of  "linux" about (18 Meg) (as a "rescue" floppy 
boot). Before the "extract", debug code shows that the "cached" entry in 
"/proc/meminfo" to be practically zero (and thus plenty of "freemem"). 
However, after the "extract", the "cached" line shows about "18Meg"  and I 
can find nothing that works to "flush" it. I have tried "spawing" 
"/sbin/update" and waiting several min. and running "/bin/sync" and also 
waiting - no change in the "cahed" entry (or and increase in the "freemem").  
(ps -ef shows a process "bdflush" running [spawned] on its own.) Thus, trying 
to bring up a "logon" shell (and its "init" scripts) results in that process 
being killed do to lack of "freemem". I have only 64M and less than 4 Meg 
free after the "extract". Any suggestions greatly appreciated in advance. If 
there any "syscall" I can make in "linuxrc" that will flush "all" buffers 
without knowing anything like "file descriptors"? Is this "syscall" 
"synchronus" - or do do I have wait several seconds for it to work?

This problem does NOT occur with 2.2.18.

Floyd,

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-08-09 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-04 17:14 can't get buffer cache to flush with /dev/ram with 2.4.4 using "update"/"sync" Floydsmith
2001-08-09 17:45 Floydsmith
2001-08-09 18:06 ` Andreas Dilger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).