Messages in this thread | | | From | Con Kolivas <> | Subject | Re: [Question]How to restrict some kind of task? | Date | Thu, 17 Nov 2005 20:57:32 +1100 |
| |
On Thu, 17 Nov 2005 17:20, liyu wrote: > I fixed it. we should insert code start of enqueue_task(): > > static void enqueue_task(struct task_struct *p, prio_array_t *array) > { > unsigned long flags; > > spin_lock_irqsave(&(task_rq(p)->keep_lock), flags); > if (p->flags & PF_KEEPOVER) { > list_del(&p->run_list); > p->state = TASK_RUNNING; > p->flags &= ~PF_KEEPOVER; > } > spin_unlock_irqrestore(&(task_rq(p)->keep_lock), flags); > > .... > } > However, this patch still have problem, it may lock entire system. > > I am trying to catch this bug~.
The obvious bug is that there are places that expect a task to be added to the run list after it has called enqueue_task and you've broken that expectation. The locking in the rest of your patch did not look too robust, but I don't have time to review it sorry.
Cheers, Con - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |