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 C404EDDE33 for ; Wed, 17 Oct 2007 12:50:53 +1000 (EST) Subject: Re: [PATCH/RFC] net: Add __napi_sycnhronize() to sync with napi poll From: Benjamin Herrenschmidt To: Stephen Hemminger In-Reply-To: <20071016115318.0fc36af3@freepuppy.rosehill> References: <1192513792.19073.23.camel@pasglop> <20071016115318.0fc36af3@freepuppy.rosehill> Content-Type: text/plain Date: Wed, 17 Oct 2007 12:50:12 +1000 Message-Id: <1192589412.11899.127.camel@pasglop> Mime-Version: 1.0 Cc: netdev@vger.kernel.org, Roland Dreier , "David S. Miller" , linuxppc-dev list Reply-To: benh@kernel.crashing.org List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , napi: use non-interruptible sleep in napi_disable The current napi_disable() uses msleep_interruptible() but doesn't (and can't) exit in case there's a signal, thus ending up doing a hot spin without a cpu_relax. Use uninterruptible sleep instead. Signed-off-by: Benjamin Herrenschmidt --- Index: linux-work/include/linux/netdevice.h =================================================================== --- linux-work.orig/include/linux/netdevice.h 2007-10-17 12:39:16.000000000 +1000 +++ linux-work/include/linux/netdevice.h 2007-10-17 12:45:00.000000000 +1000 @@ -390,7 +390,7 @@ static inline void napi_complete(struct static inline void napi_disable(struct napi_struct *n) { while (test_and_set_bit(NAPI_STATE_SCHED, &n->state)) - msleep_interruptible(1); + msleep(1); } /**