From owner-freebsd-net@FreeBSD.ORG Thu Aug 16 21:40:37 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 27FC9106564A; Thu, 16 Aug 2012 21:40:37 +0000 (UTC) (envelope-from jfvogel@gmail.com) Received: from mail-vc0-f182.google.com (mail-vc0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id BAC618FC0C; Thu, 16 Aug 2012 21:40:36 +0000 (UTC) Received: by vcbgb22 with SMTP id gb22so3632300vcb.13 for ; Thu, 16 Aug 2012 14:40:35 -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=9+dIWJq/uWRntSpdZDdcsN8y2VCumbmxYm3U+yk2AaI=; b=GHt2GMcT/hTG6Nk+ilIzxAfl0vOkTV+OcrpUkA/6veTRbkZ0fk78FEMlTBPnai4A7a 4y0Ll7XE19dlzeUu93gdBH7Qgp/teTwgCx9L64ItHB+zJ5Uxcr2DbGI4r5YZ37FPCxIV ri/xFVlWHLlmv5Gvigf6xdb2Dq59lvF4ouuLPjMmhiaNhFbl4FIAuuS5s969hEYRtW62 iDqV+U8e4V7yVJXl4/9RJo+lO5arES5PuZ39kvTJH2Z8euFhvHTw3bBrD36qiz9q6QHs L0EUuFl302JQJGzkK0DNOJ3lbb6jTLbg3rGDzzUL+vjSTKuunLyFFDZDEKKORzOs10Id O4Zg== MIME-Version: 1.0 Received: by 10.58.31.228 with SMTP id d4mr1336795vei.40.1345153235746; Thu, 16 Aug 2012 14:40:35 -0700 (PDT) Received: by 10.58.68.8 with HTTP; Thu, 16 Aug 2012 14:40:35 -0700 (PDT) In-Reply-To: <201208161736.47250.jhb@freebsd.org> References: <201208160835.53303.jhb@freebsd.org> <201208161736.47250.jhb@freebsd.org> Date: Thu, 16 Aug 2012 14:40:35 -0700 Message-ID: From: Jack Vogel To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org, Vijay Singh Subject: Re: ixgbe rx & tx locks X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Aug 2012 21:40:37 -0000 Thanks John, am seeing this, just busy on another matter, will get to it asap. Jack On Thu, Aug 16, 2012 at 2:36 PM, John Baldwin wrote: > On Thursday, August 16, 2012 8:35:53 am John Baldwin wrote: > > On Monday, August 13, 2012 6:17:53 pm Jack Vogel wrote: > > > After looking at the code again I think this is just what's happening, > > > mq_start > > > will schedule the task when it can't get the lock (due to the interrupt > > > already > > > holding it presumeably), so you get the tasklet code in contention > with the > > > interrupt. > > > > > > Anyone with a clever notion of how to do things better? > > > > Are you queueing a task that does both RX and TX? That was a bug I fixed > > in igb that caused out-of-order packet processing for RX with igb. igb > > uses a smaller task for when it's start routine fails that only tries to > > restart transmission but doesn't do fullblown interrupt handling. > > > > Here's a possible patch (compiles, not run-tested) to implement this for > > ixgbe: > > > > http://www.FreeBSD.org/~jhb/patches/ixgbe_txq_task.patch > > Actually, it looks like recent changes to the watchdog handling have > reintroduced a variant of this bug. They schedule the full RX/TX task > to run anytime the timer fires and there are pending TX completions > that are in progress. This seems a bit odd as in the normal case you > will get a TX completion interrupt once there is something to do. OTOH, > it adds another instance of duplicate RX processing which is much worse > than what this is trying to fix. I've updated this patch to disable > that bit of the watchdog handler in both igb and ixgbe: > > http://www.FreeBSD.org/~jhb/patches/ixgbe_txq_task2.patch > > -- > John Baldwin >