lkml.org 
[lkml]   [2008]   [Feb]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH [RT] 11/14] optimize the !printk fastpath through the lock acquisition
Date
On Thursday 21 February 2008 16:27:22 Gregory Haskins wrote:

> @@ -660,12 +660,12 @@ rt_spin_lock_fastlock(struct rt_mutex *lock,
> void fastcall (*slowfn)(struct rt_mutex *lock))
> {
> /* Temporary HACK! */
> - if (!current->in_printk)
> - might_sleep();
> - else if (in_atomic() || irqs_disabled())
> + if (unlikely(current->in_printk) && (in_atomic() || irqs_disabled()))

I have my doubts that gcc will honor unlikelies that don't affect
the complete condition of an if.

Also conditions guarding returns are by default predicted unlikely
anyways AFAIK.

The patch is likely a nop.

-Andi


\
 
 \ /
  Last update: 2008-02-21 17:45    [W:0.225 / U:0.248 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site