From owner-freebsd-hackers@FreeBSD.ORG Fri Aug 20 22:14:39 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 589611065698 for ; Fri, 20 Aug 2010 22:14:39 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-ew0-f54.google.com (mail-ew0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id A7DD38FC0C for ; Fri, 20 Aug 2010 22:14:38 +0000 (UTC) Received: by ewy26 with SMTP id 26so2861313ewy.13 for ; Fri, 20 Aug 2010 15:14:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=OIJq8wuNT9clZV8iFu00Ig6uaNOUiE2nS/z/JcZOPnU=; b=Wu0Wx9C/ab7m/FaBdPH2mDCtWTyFauKjtbFqBG3fGDrnfqCoJ6kxBsPQkHGnWKXtuK MZ8a0Yy3MlyTPDYmAErCNioGnG4L8CyeP1IBPdMDVpW0klDojAAXEd0fSEy4wPm0aF9X wPcnkMkxwfnsjEN8Or1eFPw1FuUEiS0i8nbRg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=DTe6RLNrZPNj6fmPuXkN8Wocn1Qgc+Oi8hrhDN2HTBOvAkSZ0ITOBfhbMu0i6Awn2B KIMwmpZZX4n47KuykqHWIl3vBaO0ptKprQfkeTGuhu4xSoMBMXM3J99BvwbseRFIMjhD HUAy/DmmCkR2yukpodVGqkb6/RtTjPBDJy68o= MIME-Version: 1.0 Received: by 10.213.16.211 with SMTP id p19mr1819635eba.88.1282342477436; Fri, 20 Aug 2010 15:14:37 -0700 (PDT) Received: by 10.213.17.66 with HTTP; Fri, 20 Aug 2010 15:14:37 -0700 (PDT) In-Reply-To: <5F142BAD-E8F5-46C4-9AF3-D5E7AEAD93A0@lineratesystems.com> References: <5F142BAD-E8F5-46C4-9AF3-D5E7AEAD93A0@lineratesystems.com> Date: Fri, 20 Aug 2010 18:14:37 -0400 Message-ID: From: Ryan Stone To: John Giacomoni Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: use of rwlocks safe in network stack? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 20 Aug 2010 22:14:39 -0000 I don't know the details of the bce driver, but presumably the interrupt handling is happening in the context of a software interrupt thread, where it is safe to take mutexes and rwlocks. You are only in interrupt context in a "fast" interrupt handler.