lkml.org 
[lkml]   [2012]   [Dec]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFC][PATCH RT] rtmutex: Use raw_spin_trylock() in rt_mutex_slowlock() to ease possible live locks
From
Date
On Wed, 2012-12-19 at 20:31 -0500, Steven Rostedt wrote:

Talking with Thomas, the proper solution is:

> Then we have this lovely code:
>
> block/blk-ioc.c: put_io_context_active()
>
> retry:
> spin_lock_irqsave_nested(&ioc->lock, flags, 1);
> hlist_for_each_entry(icq, n, &ioc->icq_list, ioc_node) {
> if (icq->flags & ICQ_EXITED)
> continue;
> if (spin_trylock(icq->q->queue_lock)) {
> ioc_exit_icq(icq);
> spin_unlock(icq->q->queue_lock);
> } else {
> spin_unlock_irqrestore(&ioc->lock, flags);
> cpu_relax();

s/cpu_relax/cpu_chill/

-- Steve

> goto retry;
> }
> }
>




\
 
 \ /
  Last update: 2012-12-20 19:41    [W:0.041 / U:0.252 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site