lkml.org 
[lkml]   [2005]   [Nov]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [Question]How to restrict some kind of task?
Date
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/

\
 
 \ /
  Last update: 2005-11-17 11:01    [W:0.050 / U:18.676 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site