From owner-freebsd-threads@FreeBSD.ORG Tue Aug 16 07:03:31 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 0E837106566C for ; Tue, 16 Aug 2011 07:03:31 +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 CC2C38FC08 for ; Tue, 16 Aug 2011 07:03:30 +0000 (UTC) Received: by iye7 with SMTP id 7so16124838iye.17 for ; Tue, 16 Aug 2011 00:03:30 -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=tqGIXek0brpwl3WJsoJ+54hIgeXzlTfX2iO2oRjImTw=; b=KDB4t3i22fvF+42JPLCzkByKlrdcB9uqIeKJF5fS+z9GqsffeFz8dnp18fGlp8tjmk lAuNI18Gfhsy+kEPAEu7L3pEaX+c2EmzNQmkIUj84ZhpuN7We35cAoNqWzCumrjqe3Md U67NYsJWRoG+Su+fcUQ7ShWd80k1aLCCpxYjo= MIME-Version: 1.0 Received: by 10.231.74.13 with SMTP id s13mr9584291ibj.78.1313478210009; Tue, 16 Aug 2011 00:03:30 -0700 (PDT) Received: by 10.231.63.198 with HTTP; Tue, 16 Aug 2011 00:03:29 -0700 (PDT) In-Reply-To: <201108151310.49272.jhb@freebsd.org> References: <4E44E326.9070405@freebsd.org> <201108151310.49272.jhb@freebsd.org> Date: Tue, 16 Aug 2011 12:33:29 +0530 Message-ID: From: Ninad Adi To: John Baldwin 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: Tue, 16 Aug 2011 07:03:31 -0000 Thanks a lot john for considering my mail. Well the things are clear now. Ninad Adi On Monday, August 15, 2011, John Baldwin wrote: > On Friday, August 12, 2011 4:59:18 am Ninad Adi wrote: >> 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 > > You should just use the 'driver_intr_t' method which will be a function that > runs in an ithread. It cannot sleep in that it cannot call functions like > tsleep() or cv_wait() or use "sleepable" locks like sx(9) locks. It can, > however, use other locks such as mutexes and rwlocks. It can also wakeup > other sleeping threads using cv_signal/broadcast, wakeup(), etc. In general > you probably don't need to use a filter routine. > > -- > John Baldwin >