int do_execve(char * filename,
char __user *__user *argv,
char __user *__user *envp,
struct pt_regs * regs)
sched_exec();
=>void sched_exec(void)
if (migrate_task(p, dest_cpu, &req))
struct task_struct *mt = rq->migration_thread;//是个实时线程
wake_up_process(mt);
=>int wake_up_process(struct task_struct *p)
return try_to_wake_up(p, TASK_ALL, 0);
=>int try_to_wake_up(struct task_struct *p, unsigned int state, int wake_flags)
cpu = select_task_rq(p, SD_BALANCE_WAKE, wake_flags);
=>int select_task_rq(struct task_struct *p, int sd_flags, int wake_flags)
int cpu = p->sched_class->select_task_rq(p, sd_flags, wake_flags);//.select_task_rq = select_task_rq_rt,
int select_task_rq_rt(struct task_struct *p, int sd_flag, int flags)
linux内核线程migration_thread和kthreadd的创建
http://blog.chinaunix.net/uid-9059-id-3451506.html