Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S266025AbUARBms (ORCPT ); Sat, 17 Jan 2004 20:42:48 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S266205AbUARBms (ORCPT ); Sat, 17 Jan 2004 20:42:48 -0500 Received: from smtp2.fre.skanova.net ([195.67.227.95]:39402 "EHLO smtp2.fre.skanova.net") by vger.kernel.org with ESMTP id S266025AbUARBmq (ORCPT ); Sat, 17 Jan 2004 20:42:46 -0500 To: Manfred Spraul Cc: linux-kernel@vger.kernel.org Subject: Re: [PATCH] remove sleep_on from sunrpc References: <40098260.20800@colorfullife.com> From: Peter Osterlund Date: 18 Jan 2004 02:45:36 +0100 In-Reply-To: <40098260.20800@colorfullife.com> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1164 Lines: 32 Manfred Spraul writes: > - while (rpciod_pid) { > + add_wait_queue(&rpciod_killer, &wait); > + for (;;) { > + set_current_state(TASK_INTERRUPTIBLE); > + if (rpciod_pid == 0) > + break; > dprintk("rpciod_down: waiting for pid %d to exit\n", rpciod_pid); > if (signalled()) { > dprintk("rpciod_down: caught signal\n"); > break; > } > - interruptible_sleep_on(&rpciod_killer); > + schedule(); > } > - spin_lock_irqsave(¤t->sighand->siglock, flags); > + remove_wait_queue(&rpciod_killer, &wait); > + spin_lock_irq(¤t->sighand->siglock); > recalc_sigpending(); > - spin_unlock_irqrestore(¤t->sighand->siglock, flags); > + spin_unlock_irq(¤t->sighand->siglock); > out: > up(&rpciod_sema); > } Aren't you forgetting to set_current_state(TASK_RUNNING) after the loop? -- Peter Osterlund - petero2@telia.com http://w1.894.telia.com/~u89404340 - 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/