From owner-freebsd-net@FreeBSD.ORG Mon Oct 22 01:43:23 2012 Return-Path: Delivered-To: net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 249FEAA; Mon, 22 Oct 2012 01:43:23 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id A1E428FC08; Mon, 22 Oct 2012 01:43:22 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id v11so3028257vbm.13 for ; Sun, 21 Oct 2012 18:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=C+eyZQMxpvYFmk5OahjX+5c16pYXjfrFx8Hps5XoPwg=; b=YAOLtOvR7ruHcrzawglgN5oM7AbSch0i87In+Wn2KFbbp5Vy0jNAP+6DTeul2HNh0A et3OywT5q4WIGsYLzPN/GnSSHOUxXArAjUFO925d3vs846xdKvc6s8ynUwVqYdTbrY8m 6+IDMLBrMvK1s1dV6e0rYhl3o8UDGAaGZlrvEFerHPTn2Jenaea2WP3mgnL6R+XVMxvi WQApu32iMc8sy93siBzNGKDWIFrXyHgYnQiqjfm0pa0TQiti23/WOF8Z3JuMe33wnJME d0Noj7ThQ5V/a3Mh+Jx6vH1yBjjpH1bphUqRoT5i1eU2aa7A5BKbPlHlAFTbVX/QF7Oi A4kQ== MIME-Version: 1.0 Received: by 10.221.2.10 with SMTP id ns10mr12497322vcb.25.1350870196088; Sun, 21 Oct 2012 18:43:16 -0700 (PDT) Received: by 10.58.207.114 with HTTP; Sun, 21 Oct 2012 18:43:16 -0700 (PDT) In-Reply-To: <50843D39.5000003@FreeBSD.org> References: <5079A9A1.4070403@FreeBSD.org> <20121015162926.GV89655@FreeBSD.org> <507D4F11.2030704@FreeBSD.org> <20121016124733.GC89655@glebius.int.ru> <50843D39.5000003@FreeBSD.org> Date: Sun, 21 Oct 2012 21:43:16 -0400 Message-ID: Subject: Re: ixgbe & if_igb RX ring locking From: Ryan Stone To: "Alexander V. Chernikov" Content-Type: text/plain; charset=ISO-8859-1 Cc: Jack Vogel , net@freebsd.org X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 22 Oct 2012 01:43:23 -0000 On Sun, Oct 21, 2012 at 2:21 PM, Alexander V. Chernikov wrote: >> ix:rx -> udp is also fairly obvious (here's one backtrace): > The same question, where "udp" -> "ix:rx" can happen ? It can't happen directly as far as I can tell. But to trigger a deadlock, "all" that has to happen is that a thread holds each mutex in the cycle while trying to acquire the next mutex in the cycle. I realize that in this case that requires five separate threads to all lose a race simultaneously, but it's still theoretically possible and needs to be avoided.