From owner-freebsd-current@FreeBSD.ORG Tue Mar 17 23:03:23 2009 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D03BE1065673 for ; Tue, 17 Mar 2009 23:03:23 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from web63901.mail.re1.yahoo.com (web63901.mail.re1.yahoo.com [69.147.97.116]) by mx1.freebsd.org (Postfix) with SMTP id 8CDEE8FC1D for ; Tue, 17 Mar 2009 23:03:23 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: (qmail 32011 invoked by uid 60001); 17 Mar 2009 23:03:22 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1237331002; bh=d047vR6PPpUP24sDrv4+4GLWNA7jldZPrJnt5JFhsq8=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=ldD6TveX1MLSsI0Q6RqlDy+/VF6Lw6DnvbjjdLtyhzXkNg6Qh+i+iRcwBf4Ca15xYa9Ozk22L/sAEppHvOomxbdYUHj+dpWBWIgG6danyS3VInoHDXznv7jwyRyYtmfwrfSOVpS69CfrMsSAZw04ZLpsIOYJRNRqZZ+9SdVMb2k= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=VQZQ0R3cfr91lavPzTE9W9LLVGE10OEpzhkGsB8PrKZXCZ5JrrTTQVmLEm0yVobKRiPZnxpwGlWR08j+jRQLrft9Cque9ai9gzHzB95thuYBc7YxG3evgftxXvvvmPAVI3UbxFhIZwo1wb4pDxKgUYQr5N0zI3W5581vLQet9Vg=; Message-ID: <914146.31317.qm@web63901.mail.re1.yahoo.com> X-YMail-OSG: ApX4FJYVM1kcI3XYucwtTAeuprrj5QWN4N8RfA13zOG2c8LUUEh9I6_NJDU26dyBoOnD.j1H2MORQrnV8UG1UYn37E2KPdXziDXuQAkahdt3n1iK5bsNfmJfkGq01VwqujW.gpO0FSuk7QIQ1SXZnZEJjci6myUNIKHa5zJEpIh9RpsGHHY777yDE0Kshw2V1_XqqqVWmIj9tTzaNwJVtflc6fCML.pY7ukk Received: from [98.242.222.229] by web63901.mail.re1.yahoo.com via HTTP; Tue, 17 Mar 2009 16:03:22 PDT X-Mailer: YahooMailWebService/0.7.289.1 Date: Tue, 17 Mar 2009 16:03:22 -0700 (PDT) From: Barney Cordoba To: Sam Leffler In-Reply-To: <49C00B0E.4030402@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: current@freebsd.org Subject: Re: Interrupt routine usage not shown by top in 8.0 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: barney_cordoba@yahoo.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Mar 2009 23:03:24 -0000 --- On Tue, 3/17/09, Sam Leffler wrote: > From: Sam Leffler > Subject: Re: Interrupt routine usage not shown by top in 8.0 > To: barney_cordoba@yahoo.com > Cc: current@freebsd.org > Date: Tuesday, March 17, 2009, 4:41 PM > Barney Cordoba wrote: > > > > > > --- On Tue, 3/17/09, Robert Watson > wrote: > > > > > >> From: Robert Watson > >> Subject: Re: Interrupt routine usage not shown by > top in 8.0 > >> To: "Paolo Pisati" > > >> Cc: "Barney Cordoba" > , current@freebsd.org > >> Date: Tuesday, March 17, 2009, 11:24 AM > >> On Tue, 17 Mar 2009, Paolo Pisati wrote: > >> > >> > >>> perhaps i misunderstood your question, but > i'll > >>> > >> try to explain a bit: > >> > >>> before 7.0, bus_setup_intr() took just one > function > >>> > >> thus you could have an INTR_FAST or an INTR_MPSAFE > handler, > >> and you choose the kind of handler via a flag > (INTR_FAST in > >> this case). > >> > >>> after 7.0, bus_setup_intr() took 2 functions, > thus you > >>> > >> could have: a fast handler (aka filter), or an > ithread > >> handler (aka mpsafe), or a fast + ithread handler > (available > >> only with INTR_FILTER turned on). > >> > >>> in bus_setup_intr() the first function pointer > is for > >>> > >> the filter side of the handler, while the second > pointer is > >> for the ithread part, and if you declare both you > can filter > >> events (interrupts) and call the rest of the > device driver > >> (the ithread part) after the filter has recognized > and > >> acknowledged&masked the interrupt. > >> > >> This clarifies my misunderstanding, thanks! > >> > >> > > > > I'd still be interested in knowing the specific > advantage/consequences > > of a fast filter vs an MPSAFE ithread? > > > > In what circumstance would using a filter and then > launching a task be advantageous over just using an ithread? > > > > It mostly depends on the hardware (unless the fast handler > does actual work). If ack'ing the interrupt improves > latency (e.g. by allowing the device to do other things) > then it's better to do that in the filter method even if > the actual work is deferred to the ithread. It's also > important when interrupts are not edge-triggered; you want > to shut them up asap. > > So, what device are you doing a driver for? > > Sam I'm working with the igb and ixgbe drivers. Neither of them use the filters, but em does. Since they are all maintained by the same person I was curious as to why the em used filters and the igb and ixgbe, which are supposedly higher performance cards, use MPSAFE ithreads. Barney