Hi all,

Yesterday night i thought of looking into the kernel source and got an
idea of understanding it from start_kernel() and document it. So i
tried to document it but only partially . I think we could start a
discussion from it. I dont understand much in it. So its better we
shall pass around the doc between and get it complete. That would be a
doc by newbies for newbies.

Thanks,
R.Vinoth Kumar
Study of kernel from start:
init/main.c

start_kernel()-> is the first function to be called up
It calls up: 
smp_processor_init() -> which defines no action
unwind_init() -> This too defines nothing.

Unwinding stack:
----------------
(It specifies that it is similar to Dwarf API but with lesser features)

lockdep_init() -> initializes lockdep defined in kernel/lockdep.c

Lockdep:
--------
This is used to validate locking :
1.lock inversion scenarios
2.circular lock dependencies
3.hardirq/softirq safe/unsafe lockings

In lockdep_init it initializes the hashtable for its use. ( I think its better 
we look into it later). It uses the linked list definitions in 
include/linux/list.h

debug_objects_init() -> Initialises a generic framework for lifetime debugging 
of objects (whats that!!!!!!!! lets see) Its actually defined in 
lib/debugobjects.c which says tht this function is used to initialize hash 
buckets and after this the tracker is operational. It uses spinlock to on every 
hashed item. It uses the hash definitions in include/linus/list.h for typing 
the debug_buckets which is a hash table(I think).

It also initializes spinlocks on each of the debug_bucket s. It uses spinlock 
definitions in include/asm-x86/spinlock.h (Possibly your architecture may be 
different. I cant find the spin_lock_init need to chk tht out).

cgroup_early_init() -> this initializes the control group. (There is too much 
of stuff going around here couldnt pick things :( )


 



Reply via email to