|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH net] xen-netback: disable rogue vif in kthread context
From: Ian Campbell
...
> > + if (unlikely(vif->disabled) && netif_carrier_ok(vif->dev))
>
> Perhaps consider extending the scope of the unlikely over the entire
> expression? (not that I expect it will matter much)
A lot of these 'unlikely' are as much a hint to the person
reading the code than to the compiler!
I found (with a much older gcc) that an overall 'unlikely' didn't
have the same effect as one on each part.
I also found that gcc ignored 'unlikely' if the 'else' branch is empty.
'if (unlikely(...)) continue' generated a backwards (predicted true)
conditional branch. I added an asm("comment " ## __LINE__) before
the continue to force a forwards condition branch to an unconditional
branch to the loop top.
(Yes - I did care about every clock in that code.)
David
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |