From owner-freebsd-hackers@FreeBSD.ORG Mon May 27 12:17:54 2013 Return-Path: Delivered-To: freebsd-hackers@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E1B7994B for ; Mon, 27 May 2013 12:17:54 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 3A369E59 for ; Mon, 27 May 2013 12:17:53 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id PAA19511; Mon, 27 May 2013 15:17:47 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <51A34EEA.9050609@FreeBSD.org> Date: Mon, 27 May 2013 15:17:46 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130517 Thunderbird/17.0.6 MIME-Version: 1.0 To: Orit Moskovich Subject: Re: preemptive kernel References: <981733489AB3BD4DB24B48340F53E0A55B0D5590@MTLDAG01.mtl.com> <20130526154752.GT3047@kib.kiev.ua> <981733489AB3BD4DB24B48340F53E0A55B0D56E0@MTLDAG01.mtl.com> <20130527063432.GY3047@kib.kiev.ua> <51A306A8.1010201@FreeBSD.org> <981733489AB3BD4DB24B48340F53E0A55B0D57D1@MTLDAG01.mtl.com> In-Reply-To: <981733489AB3BD4DB24B48340F53E0A55B0D57D1@MTLDAG01.mtl.com> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , "freebsd-hackers@freebsd.org" X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 May 2013 12:17:54 -0000 on 27/05/2013 10:21 Orit Moskovich said the following: > What is actually the difference between deferring a filter routine's work using an ithread given to bus_setup_intr, or using the global taskqueue_swi (implemented using interrupt thread)? I think you mean taskqueue_fast. The difference is only in how much code you need to write. I do not think there is any significant difference in the resulting functionality. > What do you mean that the functionality is locked under INTR_FILTER? Please see the code. You have to use option INTR_FILTER to get the behavior I described earlier. > -----Original Message----- > From: Andriy Gapon [mailto:avg@FreeBSD.org] > Sent: Monday, May 27, 2013 10:11 AM > To: Konstantin Belousov > Cc: Orit Moskovich; freebsd-hackers@freebsd.org > Subject: Re: preemptive kernel > > on 27/05/2013 09:34 Konstantin Belousov said the following: >> Having both filter and ithread for the same interrupt is apparently >> possible but weird. I do not see anything which would prevent >> interrupt filter from being executed while the ithread is running. >> But again, this is very unusual setup. > > I wouldn't call it weird, but, yes, it is rare. It's a pretty normal configuration when the filter acts as a filter and the handler acts as a handler (in ithread). In other words, it would be a replacement for a configuration where a filter is used and the filter offloads actual work to non-interrupt context via a e.g. taskqueue. > But, hmm, this functionality is probably locked under INTR_FILTER option. > > -- > Andriy Gapon > -- Andriy Gapon