Hi Min-Hua.... > Will kernel thread run out of time slice and preempted by other > thread? I created some kernel thread on linux-2.6.16 by > > kernel_thread(func, NULL, CLONE_FS | CLONE_SIGHAND); > > void func() > { > for(;;) > printk("this is process %d\n",current->pid) > } Busy looping, right? How did you know that context switch didn't happen? Anyway, your kernel thread should be preempted even it does busy looping in kernel space (also looking at the fact you didn't grab any lock). So, easy question, did you enable CONFIG_PREEMPT? regards Mulyadi -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/