Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757036AbaJ2Uvh (ORCPT ); Wed, 29 Oct 2014 16:51:37 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:59123 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755977AbaJ2Uvf (ORCPT ); Wed, 29 Oct 2014 16:51:35 -0400 Date: Wed, 29 Oct 2014 21:51:31 +0100 From: Peter Zijlstra To: Thomas Gleixner Cc: Sabrina Dubroca , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, jeffrey.t.kirsher@intel.com Subject: Re: e1000_netpoll(): disable_irq() triggers might_sleep() on linux-next Message-ID: <20141029205131.GI10501@worktop.programming.kicks-ass.net> References: <20141029155620.GA4886@kria> <20141029180734.GQ12706@worktop.programming.kicks-ass.net> <20141029193603.GS12706@worktop.programming.kicks-ass.net> <20141029195054.GH10501@worktop.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.22.1 (2013-10-16) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. > and let the core code make sure that activation/deactivation of > netpoll on a particular interface is serialized against the interrupt > and netpoll calls. > > Not sure if it's worth the trouble, but at least it allows to deal > with it in the core instead of dealing with it on a per driver base. Does multi-queue have one netdev per queue or does that need moar logicz? -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/