Re: [PATCH] RT: Add priority-queuing and priority-inheritance to workqueue infrastructure

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Daniel Walker <dwalker@...>
Cc: Peter Zijlstra <peterz@...>, Ingo Molnar <mingo@...>, Gregory Haskins <ghaskins@...>, <linux-rt-users@...>, <linux-kernel@...>
Date: Wednesday, August 1, 2007 - 4:32 pm

On 08/02, Oleg Nesterov wrote:

Aha, I missed the rt_mutex_setprio() in insert_work().

This is not good either. Suppose we have

	void work_handler(struct work_struct *self)
	{
		if (!try_lock()) {
			// try again later...
			queue_work(wq, self);
			return;
		}

		do_the_work();
	}

What if that work was queued by the low-priority thread, and
then a high-priority thread inserts a new work when work_handler()
is running?

Oleg.

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] RT: Add priority-queuing and priority-inheritanc..., Oleg Nesterov, (Wed Aug 1, 4:32 pm)