lkml.org 
[lkml]   [2007]   [Aug]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] RT: Add priority-queuing and priority-inheritance to workqueue infrastructure
From
Date
On Thu, 2007-08-02 at 00:32 +0400, Oleg Nesterov wrote:
> On 08/02, Oleg Nesterov wrote:
> >
> > And I don't understand why rt_mutex_setprio() is called just before
> > calling work->func(). This means that a high-priority work could
> > be delayed by the low-priority ->current_work.
>
> 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?

You mean the above queue_work(wq, self) would get an arbitrarily higher
priority vs. what it would normally?

Yeah, I suppose we would want follow the priority inside the workqueue
thread only ..

Daniel

-
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: 2007-08-01 22:49    [W:0.066 / U:13.668 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site