From owner-freebsd-hackers@FreeBSD.ORG Mon May 27 12:29:47 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 6CFD8EBA; Mon, 27 May 2013 12:29:47 +0000 (UTC) (envelope-from oritm@mellanox.com) Received: from eu1sys200aog120.obsmtp.com (eu1sys200aog120.obsmtp.com [207.126.144.149]) by mx1.freebsd.org (Postfix) with ESMTP id DC101EF1; Mon, 27 May 2013 12:29:44 +0000 (UTC) Received: from MTLCAS01.mtl.com ([193.47.165.155]) (using TLSv1) by eu1sys200aob120.postini.com ([207.126.147.11]) with SMTP ID DSNKUaNRoDa4ba30RnxD60XJmtW7fUIvaSZv@postini.com; Mon, 27 May 2013 12:29:46 UTC Received: from MTLDAG01.mtl.com ([10.0.8.75]) by MTLCAS01.mtl.com ([10.0.8.71]) with mapi id 14.03.0123.003; Mon, 27 May 2013 15:29:19 +0300 From: Orit Moskovich To: Andriy Gapon Subject: RE: preemptive kernel Thread-Topic: preemptive kernel Thread-Index: AQHOWihm0YFG89T8IkWOFRvrz7kZiJkYcsLw///vIACAAAnDAIAANDrggAAh6QCAADRysA== Date: Mon, 27 May 2013 12:29:19 +0000 Message-ID: <981733489AB3BD4DB24B48340F53E0A55B0D59A0@MTLDAG01.mtl.com> 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> <51A34EEA.9050609@FreeBSD.org> In-Reply-To: <51A34EEA.9050609@FreeBSD.org> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.0.13.1] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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:29:47 -0000 >From what I've read in subr_taskqueue.c taskqueue_swi, taskqueue_swi_giant = and taskqueue_fast are all implemented using swi_add which calls ithread_cr= eate(). Is there any performance difference between them. Is one of the above or it= hread given to bus_setup_intr preferable on the other? -----Original Message----- From: Andriy Gapon [mailto:avg@FreeBSD.org]=20 Sent: Monday, May 27, 2013 03:18 PM To: Orit Moskovich Cc: Konstantin Belousov; freebsd-hackers@freebsd.org Subject: Re: preemptive kernel 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_sw= i (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 behavio= r 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 >=20 > on 27/05/2013 09:34 Konstantin Belousov said the following: >> Having both filter and ithread for the same interrupt is apparently=20 >> possible but weird. I do not see anything which would prevent=20 >> interrupt filter from being executed while the ithread is running. >> But again, this is very unusual setup. >=20 > I wouldn't call it weird, but, yes, it is rare. It's a pretty normal con= figuration when the filter acts as a filter and the handler acts as a handl= er (in ithread). In other words, it would be a replacement for a configura= tion where a filter is used and the filter offloads actual work to non-inte= rrupt context via a e.g. taskqueue. > But, hmm, this functionality is probably locked under INTR_FILTER option. >=20 > -- > Andriy Gapon >=20 -- Andriy Gapon