From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754161AbYGBITV (ORCPT ); Wed, 2 Jul 2008 04:19:21 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752345AbYGBITF (ORCPT ); Wed, 2 Jul 2008 04:19:05 -0400 Received: from earthlight.etchedpixels.co.uk ([81.2.110.250]:50213 "EHLO lxorguk.ukuu.org.uk" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752020AbYGBITB (ORCPT ); Wed, 2 Jul 2008 04:19:01 -0400 Date: Wed, 2 Jul 2008 09:00:48 +0100 From: Alan Cox To: Mikulas Patocka Cc: Jens Axboe , linux-kernel@vger.kernel.org, Neil Brown Subject: Re: [PATCH 1/2] Avoid bio_endio recursion Message-ID: <20080702090048.2ec99b72@lxorguk.ukuu.org.uk> In-Reply-To: References: <20080624080744.GL20851@kernel.dk> <20080625082421.GU20851@kernel.dk> <20080626070723.GL20851@kernel.dk> X-Mailer: Claws Mail 3.4.0 (GTK+ 2.12.10; x86_64-redhat-linux-gnu) Organization: Red Hat UK Cyf., Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SL4 1TE, Y Deyrnas Gyfunol. Cofrestrwyd yng Nghymru a Lloegr o'r rhif cofrestru 3798903 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2 Jul 2008 00:09:22 -0400 (EDT) Mikulas Patocka wrote: > > Right, that wont work of course. Completions are typically done through > > a softirq, so it is not currently done with hard interrupts disabled. > > I thought, from hardirq - that's what IDE is doing. And they are called Even IDE will sometimes complete from a timer on an error. > And does local_irq_restore() need to execute even more costy "popf" when > it makes a transition from disabled to disabled state? What's > local_irq_restore semantics --- is it allowed to use local_irq_restore for > transition from interrupt-enabled state into interrupt-disabled state? If you are worried about performance the network layer has _irq variants of various functions that are faster and can only be called from the right context (eg kfree_skb_irq), so you could do two versions of that code. Alan