Kernel
Linux Kernel
How to free cached memory and dirty pages in Linux
Jan 15th
When an application reads a file, Linux kernel keeps cache of file contents in memory. The Linux keeps the cache even after application closes the file to improve performance for further read operations of same file. This cache is freed slowly as when Linux finds no free memory during it operation.
Similarly when an application write a file, Linux doesn’t write the contents to disk immediately and waits for some time before it actually writes to the disk. These buffers are called dirty buffers.
User can manually initiate the writing of dirty buffers to disk executing “sync” command few times.
From kernel version More >
How to see Linux kernel boot messages
Nov 11th
The dmesg command can be used to view the boot messages printed by Linux kernel. The Linux kernel maintains a ring buffer (default size 16KB) to hold boot-time messages printed using printk() function call in kernel code. The dmesg command can be used to control the ring buffer as well.
[neo@techpulp ~]$ dmesg Linux version 2.6.23.15-137.fc8 (mockbuild@xenbuilder2.fedora.redhat.com) (gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)) #1 SMP Sun Feb 10 17:48:34 EST 2008 BIOS-provided physical RAM map: BIOS-e820: 0000000000000000 - 000000000009dc00 (usable) BIOS-e820: 000000000009dc00 - 00000000000a0000 (reserved) BIOS-e820: 00000000000d2000 - 0000000000100000 (reserved) BIOS-e820: 0000000000100000 - 000000007bf10000 (usable) BIOS-e820: 000000007bf10000 - 000000007bf19000 (ACPI data) .... .... More >
How to hide Linux Kernel boot messages
Oct 4th
Often in embedded systems, one would like to hide/suppress the messages printed by Linux Kernel while booting. Linux Kernel supports a boot-time argument “quite“. If “quite” is given as one of the command-line arguments, Linux Kernel doesn’t not print most of the boot messages on console. However it still prints few lines of messages. To remove those, one should examine Linux kernel source code and comment them.


Recent Comments