public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Busy on BLKFLSBUF w/initrd
@ 2001-05-23 21:48 Maciek Nowacki
  2001-05-23 22:05 ` Alexander Viro
  2001-05-24 18:39 ` Maciek Nowacki
  0 siblings, 2 replies; 17+ messages in thread
From: Maciek Nowacki @ 2001-05-23 21:48 UTC (permalink / raw)
  To: linux-kernel

Hi,

I have continuing problems with getting the initrd ramdisk out of memory once
bootup is complete.

This is with recent -ac kernels which have the fix-up posted a few months ago
applied.

The sequence is roughly:

- boot via pxelinux, loads up bzImage <1MB and root.romfs.gz ~7MB, expands to
  about 30.
- mount -n -t tmpfs none tmp
- cp root -> /tmp
- pivot_root -> /tmp
- umount old_root/dev (devfs kernel)
- umount old_root

Then another pivot_root a bit later on before /sbin/init is invoked. The
point is to move the initrd to a tmpfs which will reclaim memory in the event
that the filesystem cannot be unmounted, due to having mountpoints for
loopback host filesystems in this case.

It seems to work fine, and the initrd _does_ unmount with no problems
(unmounting old_root/dev does complain about mtab, but works, ls old_root/dev
shows empty). However, blockdev --flushbufs /dev/rd/0 fails with busy on
BLKFLSBUF once the system is running.

About the only odd thing besides the message about mtab from umount is the
kernel notice right before entering /bin/sh on the romfs initrd - it prints
out two messages about mounting the ramdisk:

May 22 09:14:30 wintermute kernel: Linux version 2.4.4-ac12 (maciek@wintermute) (gcc version 2.95.4 20010506 (Debian prerelease)) #1 Mon May 21 20:08:36 MDT 2001
[...]
May 22 09:14:31 wintermute kernel: RAMDISK: romfs filesystem found at block 0
May 22 09:14:31 wintermute kernel: RAMDISK: Loading 28216 blocks [1 disk] into ram disk... done.
May 22 09:14:31 wintermute kernel: Freeing initrd memory: 28216k freed
May 22 09:14:31 wintermute kernel: VFS: Mounted root (romfs filesystem) readonly.
May 22 09:14:31 wintermute kernel: Mounted devfs on /dev
May 22 09:14:31 wintermute kernel: VFS: Mounted root (romfs filesystem) readonly.
May 22 09:14:31 wintermute kernel: change_root: old root has d_count=7
May 22 09:14:31 wintermute kernel: Mounted devfs on /dev
May 22 09:14:31 wintermute kernel: Trying to unmount old root ... okay

Perhaps they're bumping up the reference count so that it is impossible to
free the ramdisk later?

Thanks very much for any help!

Maciek

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

end of thread, other threads:[~2001-05-25 15:43 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-05-23 21:48 Busy on BLKFLSBUF w/initrd Maciek Nowacki
2001-05-23 22:05 ` Alexander Viro
2001-05-23 22:11   ` Maciek Nowacki
2001-05-23 22:21     ` Alexander Viro
2001-05-23 23:23       ` Maciek Nowacki
2001-05-23 23:28         ` Alexander Viro
2001-05-23 23:45           ` Maciek Nowacki
2001-05-24  5:32   ` Mike Galbraith
2001-05-24 10:42     ` Alexander Viro
2001-05-24 10:56       ` Mike Galbraith
2001-05-24 11:24         ` Alexander Viro
2001-05-24 11:57           ` Herbert Xu
2001-05-24 13:27           ` Mike Galbraith
2001-05-24 13:33             ` Alexander Viro
2001-05-24 18:39 ` Maciek Nowacki
2001-05-25  5:20   ` Scott Murray
2001-05-25 15:42     ` Maciek Nowacki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox