From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate.crashing.org (gate.crashing.org [63.228.1.57]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTP id 36897DDE40 for ; Tue, 16 Oct 2007 17:37:40 +1000 (EST) Subject: Re: [PATCH/RFC] net: Add __napi_sycnhronize() to sync with napi poll From: Benjamin Herrenschmidt To: Herbert Xu In-Reply-To: References: Content-Type: text/plain Date: Tue, 16 Oct 2007 17:37:03 +1000 Message-Id: <1192520223.7205.5.camel@pasglop> Mime-Version: 1.0 Cc: netdev@vger.kernel.org, rdreier@cisco.com, shemminger@linux-foundation.org, davem@davemloft.net, linuxppc-dev@ozlabs.org Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 2007-10-16 at 14:06 +0800, Herbert Xu wrote: > Benjamin Herrenschmidt wrote: > > > > Note: I use msleep_interruptible(1); just like napi_disable(). However > > I'm not too happy that the "hot" loop that results of a pending signal > > here will spin without even a cpu_relax ... what do you guys think would > > be the best way to handle this ? > > Well since the loop does not check signals at all, it should > just use msleep. > > Granted the process will end up in the D state and contribute > to the load average. But if this loop executes long enough > for that to be noticed then we've got bigger problems to worry > about. If Dave & Stephen agree, I'll send a patch changing napi_disable() too then. Cheers, Ben.