Blogs
Exploring Linux Cgroups
Cgroup initialization
Call stack
start_kernel()
cgroup_init_early()
for_each_subsys()
mem_cgroup_init()
cgroup_init()
for_each_subsys()
cgroup Macro Expansion
Linux kernel uses x-macros to populate an enum list, cgroup_subsys_id, which represents the Cgroup subsystem IDs. …
Linux kmalloc memory …
Allocating Memory (p. 213)
Kmalloc
- Similar to malloc
- Fast unless it blocks and doesn't clear obtained memory; allocated region still holds previous content
- Allocated Region is also contiguous in PHysical memory ** Very important note about kmalloc() **
#include <linux/slab.h>
void …Linux Bootloader
Booloaders on i386/x86_64
Before examining this code, you’ll notice three files in arch/x86/mm/, named init_32.c, init_64.c, and init.c. The file named init.c, is used by the main program entry point for Memory Management. Minimal Assembly is always required to boot hardware; however, most …


