lkml.org 
[lkml]   [2014]   [Oct]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: e1000_netpoll(): disable_irq() triggers might_sleep() on linux-next
On Wed, 29 Oct 2014, Peter Zijlstra wrote:

> On Wed, Oct 29, 2014 at 09:23:42PM +0100, Thomas Gleixner wrote:
> > But at least it allows to mitigate the impact by making it conditional
> > at a central point.
> >
> > static inline void netpoll_lock(struct net_device *nd)
> > {
> > if (netpoll_active(nd))
> > spin_lock(&nd->netpoll_lock);
> > }
>
> branch fail vs lock might be a toss on most machines, but if we're
> hitting cold cachelines we loose big.

Well, if the net_device is not cache hot on irq entry you have lost
already. The extra branch/lock is not going to add much to that.

Thanks,

tglx


\
 
 \ /
  Last update: 2014-10-29 22:41    [W:0.056 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site