From owner-freebsd-threads@FreeBSD.ORG Fri Aug 12 08:59:19 2011 Return-Path: Delivered-To: freebsd-threads@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CBD34106564A; Fri, 12 Aug 2011 08:59:19 +0000 (UTC) (envelope-from adi.ninad@gmail.com) Received: from mail-iy0-f172.google.com (mail-iy0-f172.google.com [209.85.210.172]) by mx1.freebsd.org (Postfix) with ESMTP id 884E58FC08; Fri, 12 Aug 2011 08:59:19 +0000 (UTC) Received: by iye7 with SMTP id 7so5239757iye.17 for ; Fri, 12 Aug 2011 01:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=3F6WW8gvQ8PS8TnrGxUMnsMWf8V1/QAeCx/x0BMkAFo=; b=bETSrA2eKx/eKrNOcCbHE6b0oxBwM8DCT09KfomPv7+yq2vgAO4Ak7DqDWQmgkSY4l 8u40FI6XA8n+MbGowYre/ASVwQEVboVwZgHlqqumGx0mGSoeVDxN34E7lnQpSwhfDEiT I34RKbzIxnTAGNWWs3fv8gVeYnFlpq5AQK2U8= MIME-Version: 1.0 Received: by 10.231.83.135 with SMTP id f7mr1389065ibl.90.1313139558816; Fri, 12 Aug 2011 01:59:18 -0700 (PDT) Received: by 10.231.63.198 with HTTP; Fri, 12 Aug 2011 01:59:18 -0700 (PDT) In-Reply-To: <4E44E326.9070405@freebsd.org> References: <4E44CBA6.9050809@freebsd.org> <4E44E326.9070405@freebsd.org> Date: Fri, 12 Aug 2011 14:29:18 +0530 Message-ID: From: Ninad Adi To: Julian Elischer Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "freebsd-threads@freebsd.org" Subject: Re: Urgent interrupt thread X-BeenThere: freebsd-threads@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Threading on FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2011 08:59:19 -0000 Thanks for your prompt replies sir, just one more clarification the routine bus_setup_intr has 5th arg of type driver_intr_t ithread then if I am not wrong my isr is running as a thread, probably thats the reason why latest drivers dont use Deferring mechanism like iwi, iwn, ral. However Atheros is still using taskqueues which is considerably old I suppose. So using filter+ithread model without deferring Should be fine. Plz let me know your opinions on the same, It would help me understand freebsd better. Will not disturb you more. Awaiting,reply Thanks a lot, Ninad Adi. On Friday, August 12, 2011, Julian Elischer wrote: > On 8/12/11 12:45 AM, Ninad Adi wrote: > > So in the routine bus_setup_intr the isr runs as > ithread but then if its a thread why its not allowed to sleep it aquires mutex lock , disables > all interrupts and continues. > > > if it is running as an ithread it can do those things. > if it is running as a fast interrupt handler it can't. > the driver sets how the code is to be run > > > > My last question is in that case do we need to > Use taskqueues or we can completely write the > Isr in one thread itself without using deferring > Primitives. I.e can we refrain from using deferring mechanism. > > if you use an ithread you can do what you want.. > > http://www.unix.com/man-page/FreeBSD/9/ithread/ > > > > > awaiting the reply. > > Ninad Adi. > > > On Friday, August 12, 2011, Julian Elischer wrote: >> On 8/11/11 3:13 AM, Ninad Adi wrote: >>> >>> To, >>> Freebsd greats, >>> >>> Dear sirs, >>> In freebsd 8.2 kernel architecture >>> Do interrupt handlers run as threads by >>> default or do they run in interrupt context ?? >>> >>> Ninad. >>> Freebsd developer. >>> _______________________________________________ >>> freebsd-threads@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-threads < http://lists.freebsd.org/mailman/listinfo/freebsd-threads> >>> To unsubscribe, send any mail to " freebsd-threads-unsubscribe@freebsd.org" >>> >> you have the choice to do either. >> >> >> key words to look up are 'fast' interrupts and "interrrupt threads" >> >> I've not used either for many years. so I hope that helps enough that you can find hte right answer. >> >> >> >> >