On 9/14/05, Dinesh Ahuja <mdlinux7@xxxxxxxxxxx> wrote: > Hi All, > > I have following queries regarding task queues : > 1. In which context does __run_task_queue gets > executed ? run_task_queue runs in a context of bottom half, and AFAIR it mostly runs task queues as a result of software interrupt ..... And runs when the kernel gets around to it .......... > 2. A queue_task invokes list_add_tail which places > task_struct in task_queue [typedef for list_head]. Why > does __run_task_queue calls list_add and list_del_init > ? What we are trying to achieve ? To invoke a task in > a queue why we need to call list_add ? actually it is used to get/add that previous list in local list of __run_task_queue function and to invoke the functions in the list, and frees/re-initializes the main task_lists (tq_xxxxx), so that previous task might not run again in the next call to it and also to reduce the locking time on the global tq_xxxxxx lists. > 3. Where does keventd kernel thread is intialized > which runs task on scheduler queue. In tqueue.h, i > could see only three pre-defined queues > tq_timer,tq_immediate and tq_disk, so where is > tq_scheduler. > actually AFAIR tq_scheduler is used to run the task in arbitrary process context and it is done through fucntion call schedule_task which adds the task in tq_context list ..... you can see context.c for it ........ -- Fawad Lateef -- Kernelnewbies: Help each other learn about the Linux kernel. Archive: http://mail.nl.linux.org/kernelnewbies/ FAQ: http://kernelnewbies.org/faq/