Yes, I see. But still I think the whole idea is broken, not just the
implementation.
What about delayed_work? insert_work() will use ->normal_prio of
the random interrupted process, while queue_work() uses current.
What if a niced thread queues the work? This work may have no chance
to run if workqueue is actively used.
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.
Ok, thanks, I'll take a look. Still, we can't use raw_smp_processor_id()
unless we disabled cpu-hotplug.
Oleg.
-