Initrd and system used memory
Billalabeitia, Jose Carlos (IndSys, GEPM)
jc.billalabeitia at indsys.ge.com
Fri Apr 20 17:06:17 EST 2001
Hi everybody:
Despite the fact that this title may sound like the problem is
already solved,
I have some questions about it. First of all, I have to tell you that am
working with
a MBX860 006C board and with our own prototype board, and both of them have
16MB of RAM. I have already got Linux 2.4.0 (test13-pre3) running on both of
them,
with an initrd and sash as the stand alone shell. Further in this email
there are more
details about the configuration and set up.
The problem has to do with the size of the initrd. Here are some numbers
that
detail the issue:
initrd total used free shared
buffers cached
------- ------ ------- -----
--------- --------- ----------
4MB 15.699.968 6.660.096 9.039.872 2.236.416 4.194.304
1.257.472
6MB 15.699.968 9.056.256 6.643.712 2.400.256 6.291.456
1.323.008
8MB 15.699.968 11.366.400 4.333.568 2.408.448 8.388.608
1.323.008
Initially the filesystem occupies about 1.1MB and as you can see here, the
greater
the initrd is the larger the amount used memory is and the lower the free
memory
available for the filesystem and system. I thought that part of the used
memory was
really allocated for the filesystem but every time I add a new file to the
file system,
the free memory gets reduced and the used memory increased.
My questions are:
1.- Why have I got so much used memory at the start-up time? What
is this memory used for?
2.- what is wrong in all this ? (see the configuration bellow)
************************** SYSTEM CONFIGURATION
**********************************
0.- The memory needed for the kernel and filesystem:
Compressed kernel about 270KB
Compressed filesytem about 1.25MB
Uncompressed kernel about 800KB
Initial uncompressed filesystem about 3.1MB
1.-Here is the script I use to generate the initrd (in this case for 10MB):
dd if=/dev/zero of=kk bs=1k count=10240
mke2fs -vm0 kk 10240
mount -o loop -t ext2 kk /mnt/ram
cp -a filesystem/* /mnt/ram
df /mnt/ram
umount /mnt/ram
dd if=kk bs=1k count=10240 | gzip -v9 > imagen_ramdisk.gz
2.- The argument line given to the kernel by the PPCBoot is:
root=/dev/ram rw ramdisk-size=10240
3.- The kernel configuration is as follow:
#
# Automatically generated by make menuconfig: don't edit
#
# CONFIG_UID16 is not set
#
# Code maturity level options
#
# CONFIG_EXPERIMENTAL is not set
#
# Loadable module support
#
# CONFIG_MODULES is not set
#
# Platform support
#
CONFIG_PPC=y
# CONFIG_6xx is not set
# CONFIG_4xx is not set
# CONFIG_POWER3 is not set
# CONFIG_POWER4 is not set
CONFIG_8xx=y
CONFIG_SERIAL_CONSOLE=y
# CONFIG_RPXLITE is not set
# CONFIG_RPXCLASSIC is not set
# CONFIG_BSEIP is not set
# CONFIG_TQM823L is not set
# CONFIG_TQM850L is not set
# CONFIG_TQM855L is not set
# CONFIG_TQM860L is not set
# CONFIG_FPS850L is not set
# CONFIG_TQM860 is not set
# CONFIG_SPD823TS is not set
# CONFIG_IVMS8 is not set
# CONFIG_IVML24 is not set
# CONFIG_SM850 is not set
# CONFIG_HERMES is not set
# CONFIG_HERMES_SH is not set
# CONFIG_IP860 is not set
CONFIG_MBX=y
# CONFIG_WINCEPT is not set
# CONFIG_WORKSTATION_PPC is not set
# CONFIG_SMP is not set
# CONFIG_OPENFIRMWARE is not set
# CONFIG_MATH_EMULATION is not set
# CONFIG_SASH is not set
#
# General setup
#
# CONFIG_HIGHMEM is not set
# CONFIG_MOL is not set
# CONFIG_ISA is not set
# CONFIG_EISA is not set
# CONFIG_SBUS is not set
# CONFIG_MCA is not set
# CONFIG_PCI_QSPAN is not set
# CONFIG_PCI is not set
# CONFIG_NET is not set
# CONFIG_SYSCTL is not set
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_KCORE_ELF=y
CONFIG_BINFMT_ELF=y
CONFIG_KERNEL_ELF=y
# CONFIG_BINFMT_MISC is not set
# CONFIG_HOTPLUG is not set
# CONFIG_PCMCIA is not set
#
# Parallel port support
#
# CONFIG_PARPORT is not set
# CONFIG_PPC_RTC is not set
#
# Memory Technology Devices (MTD)
#
CONFIG_MTD=y
# CONFIG_MTD_DEBUG is not set
# CONFIG_MTD_DOC1000 is not set
# CONFIG_MTD_DOC2000 is not set
# CONFIG_MTD_DOC2001 is not set
# CONFIG_MTD_DOCPROBE is not set
# CONFIG_MTD_SLRAM is not set
# CONFIG_MTD_PMC551 is not set
# CONFIG_MTD_MTDRAM is not set
# CONFIG_MTD_CFI is not set
# CONFIG_MTD_CFI_INTELEXT is not set
# CONFIG_MTD_CFI_AMDSTD is not set
# CONFIG_MTD_RAM is not set
# CONFIG_MTD_ROM is not set
# CONFIG_MTD_JEDEC is not set
# CONFIG_MTD_PHYSMAP is not set
# CONFIG_MTD_MIXMEM is not set
# CONFIG_MTD_NORA is not set
# CONFIG_MTD_OCTAGON is not set
# CONFIG_MTD_PNC2000 is not set
# CONFIG_MTD_RPXLITE is not set
# CONFIG_MTD_VMAX is not set
# CONFIG_MTD_CHAR is not set
# CONFIG_MTD_BLOCK is not set
CONFIG_FTL=y
# CONFIG_NFTL is not set
#
# Plug and Play configuration
#
# CONFIG_PNP is not set
# CONFIG_ISAPNP is not set
#
# Block devices
#
# CONFIG_BLK_DEV_FD is not set
# CONFIG_BLK_DEV_XD is not set
# CONFIG_PARIDE is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_LOOP is not set
# CONFIG_BLK_DEV_NBD is not set
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=10240
CONFIG_BLK_DEV_INITRD=y
#
# Multi-device support (RAID and LVM)
#
# CONFIG_MD is not set
# CONFIG_BLK_DEV_MD is not set
# CONFIG_MD_LINEAR is not set
# CONFIG_MD_RAID0 is not set
# CONFIG_MD_RAID1 is not set
# CONFIG_MD_RAID5 is not set
# CONFIG_BLK_DEV_LVM is not set
# CONFIG_LVM_PROC_FS is not set
#
# ATA/IDE/MFM/RLL support
#
# CONFIG_IDE is not set
# CONFIG_BLK_DEV_IDE_MODES is not set
# CONFIG_BLK_DEV_HD is not set
#
# SCSI support
#
# CONFIG_SCSI is not set
#
# Amateur Radio support
#
# CONFIG_HAMRADIO is not set
#
# ISDN subsystem
#
# CONFIG_ISDN is not set
#
# Old CD-ROM drivers (not SCSI, not IDE)
#
# CONFIG_CD_NO_IDESCSI is not set
#
# Console drivers
#
#
# Frame-buffer support
#
# CONFIG_FB is not set
#
# Input core support
#
# CONFIG_INPUT is not set
#
# Macintosh device drivers
#
#
# Character devices
#
# CONFIG_VT is not set
# CONFIG_SERIAL is not set
# CONFIG_SERIAL_EXTENDED is not set
# CONFIG_SERIAL_NONSTANDARD is not set
# CONFIG_UNIX98_PTYS is not set
#
# I2C support
#
# CONFIG_I2C is not set
#
# Mice
#
# CONFIG_BUSMOUSE is not set
# CONFIG_MOUSE is not set
#
# Joysticks
#
# CONFIG_JOYSTICK is not set
# CONFIG_QIC02_TAPE is not set
#
# Watchdog Cards
#
# CONFIG_WATCHDOG is not set
# CONFIG_INTEL_RNG is not set
# CONFIG_NVRAM is not set
# CONFIG_RTC is not set
# CONFIG_DTLK is not set
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_FLASH is not set
#
# Ftape, the floppy tape device driver
#
# CONFIG_FTAPE is not set
# CONFIG_AGP is not set
# CONFIG_DRM is not set
#
# Multimedia devices
#
# CONFIG_VIDEO_DEV is not set
#
# File systems
#
# CONFIG_QUOTA is not set
# CONFIG_AUTOFS_FS is not set
# CONFIG_AUTOFS4_FS is not set
# CONFIG_ADFS_FS is not set
# CONFIG_ADFS_FS_RW is not set
# CONFIG_AFFS_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_FAT_FS is not set
# CONFIG_MSDOS_FS is not set
# CONFIG_UMSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_JFFS_FS is not set
# CONFIG_CRAMFS is not set
# CONFIG_RAMFS is not set
# CONFIG_ISO9660_FS is not set
# CONFIG_JOLIET is not set
CONFIG_MINIX_FS=y
# CONFIG_NTFS_FS is not set
# CONFIG_NTFS_RW is not set
# CONFIG_HPFS_FS is not set
CONFIG_PROC_FS=y
# CONFIG_DEVFS_FS is not set
# CONFIG_DEVFS_MOUNT is not set
# CONFIG_DEVFS_DEBUG is not set
# CONFIG_DEVPTS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_QNX4FS_RW is not set
# CONFIG_ROMFS_FS is not set
CONFIG_EXT2_FS=y
# CONFIG_SYSV_FS is not set
# CONFIG_SYSV_FS_WRITE is not set
# CONFIG_UDF_FS is not set
# CONFIG_UDF_RW is not set
# CONFIG_UFS_FS is not set
# CONFIG_UFS_FS_WRITE is not set
# CONFIG_NCPFS_NLS is not set
# CONFIG_SMB_FS is not set
#
# Partition Types
#
# CONFIG_PARTITION_ADVANCED is not set
CONFIG_MSDOS_PARTITION=y
# CONFIG_NLS is not set
#
# Sound
#
# CONFIG_SOUND is not set
#
# MPC8xx CPM Options
#
# CONFIG_8xxSMC2 is not set
# CONFIG_SCC1_UART is not set
# CONFIG_SCC2_UART is not set
# CONFIG_SCC3_UART is not set
# CONFIG_SCC4_UART is not set
# CONFIG_8xx_COPYBACK is not set
# CONFIG_8xx_CPU6 is not set
#
# USB support
#
# CONFIG_USB is not set
#
# Kernel hacking
#
# CONFIG_MAGIC_SYSRQ is not set
# CONFIG_KGDB is not set
# CONFIG_XMON is not set
4.- The sytem booting is:
........
## Booting Linux kernel at fe100000 ...
Image Name: KERNEL 2.4.0 for PowerPC860
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 274640 Bytes = 268 kB = 0 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Loading RAMDisk Image at fe200000 ...
Image Name: RAMDISK 2.4.0 of 10240 for Power
Image Type: PowerPC Linux RAMDisk Image (gzip compressed)
Data Size: 1183376 Bytes = 1155 kB = 1 MB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Loading Ramdisk to 00e7d000, end 00f9de90 ... OK
## Transferring control to Linux (at address 00000000) ...
Linux version 2.4.0-test13-pre3 (root at pc127) (gcc version 2.95.2 19991030
(2.95.
3 prerelease/franzo)) #5 lun abr 9 19:15:10 CEST 2001
Boot arguments: root=/dev/ram rw ramdisk_size=10240
On node 0 totalpages: 4096
zone(0): 4096 pages.
zone(1): 0 pages.
zone(2): 0 pages.
Kernel command line: root=/dev/ram rw ramdisk_size=10240
Decrementer Frequency: 3125000
Calibrating delay loop... 49.56 BogoMIPS
Memory: 14124k available (516k kernel code, 240k data, 32k init, 0k highmem)
Dentry-cache hash table entries: 2048 (order: 2, 16384 bytes)
Buffer-cache hash table entries: 1024 (order: 0, 4096 bytes)
Page-cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 1024 (order: 1, 8192 bytes)
POSIX conformance testing by UNIFIX
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Starting kswapd v1.8
CPM UART driver version 0.03-wd
ttyS0 on SMC1 at 0x0280, BRG1
RAMDISK driver initialized: 16 RAM disks of 10240K size 1024 blocksize
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 1156k freed
EXT2-fs warning: checktime reached, running e2fsck is recommended
VFS: Mounted root (ext2 filesystem).
INIT: version 2.77 bootingry: 32k init 4k openfirmware
INIT: Entering runlevel: 3
Stand-alone shell (version 3.4)
Built-in commands are aliased to standard commands
>
Thanks in advance
Billa
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
More information about the Linuxppc-embedded
mailing list