[Click] [PATCH 2/2] Task: Kill process_pending dead lock
Eddie Kohler
kohler at cs.ucla.edu
Wed Sep 10 11:54:58 EDT 2008
Joonwoo,
Thanks very much for this patch and as usual for all your Click work!!
About this patch, though. This patch does not make sense to me. The
Task::add_pending() function does NOT attempt to lock the RouterThread's
_task_lock. It locks the Master::_task_lock. And none of the code that
manipulates Master::_task_lock looks like it could cause deadlock
(Master::_task_lock is held for short periods of time with no functions).
Task::add_pending() does call RouterThread::add_pending(), but this function
is safe to call without RouterThread::_task_lock.
So, can you explain in more detail what deadlock you thought you fixed with
this patch? Is my analysis wrong? Does SpinlockIRQ need updating along the
lines of Spinlock to pin a thread to the current CPU?
Eddie
Joonwoo Park wrote:
> Hello Eddie,
>
> I think the function Task::add_pending() should haven't called while
> task is locked since it might cause dead lock.
> This patch fixes it by unlocking before calling add_pending.
>
> Please consider applying this patch.
>
> Thanks,
> Joonwoo
More information about the click
mailing list