From owner-freebsd-current@FreeBSD.ORG Mon Nov 1 17:30:49 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2979A1065787 for ; Mon, 1 Nov 2010 17:30:49 +0000 (UTC) (envelope-from pyunyh@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id CB2878FC0C for ; Mon, 1 Nov 2010 17:30:46 +0000 (UTC) Received: by vws12 with SMTP id 12so4129783vws.13 for ; Mon, 01 Nov 2010 10:30:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:received:from:date:to:cc :subject:message-id:reply-to:references:mime-version:content-type :content-disposition:in-reply-to:user-agent; bh=1IKMJ1yjMHnw8ANEZkbPsVy7Hd68yHoWg5j/lNbhry8=; b=wqwUDPOPijFbOxJD7sfuv7nCPgh04tmkcHIm9NmoqhAcDM21NicYPB3+IT7u23i/mp 5lCbvDDpfRFau1UXS8eNSk6ODgicfMDp3OWOdzY3CublY7vheTSFQYRcTST+1r4W1kVL e+99rZm/FwS7stcIAetThOsTvnUaeK7fnw8uM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:date:to:cc:subject:message-id:reply-to:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; b=hBtflYGGt5K+9mEvks/S1fvXLFuqowkJHWJCxCE8iUbwSALN7PXGSHJe5s66QL2eG5 yTp6j5vwkk8NR/OEF1TVcUd1cA8o9uWDCbXgF4uSjWXKVl56YNBbJ3tgz7r/fuR/rcbu MJamEqfORHbBhxh3OuWiZ7OUxcqEjoACX00QY= Received: by 10.229.229.199 with SMTP id jj7mr1006538qcb.130.1288632645956; Mon, 01 Nov 2010 10:30:45 -0700 (PDT) Received: from pyunyh@gmail.com ([174.35.1.224]) by mx.google.com with ESMTPS id l14sm5200207qck.29.2010.11.01.10.30.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 01 Nov 2010 10:30:43 -0700 (PDT) Received: by pyunyh@gmail.com (sSMTP sendmail emulation); Mon, 1 Nov 2010 10:30:36 -0700 From: Pyun YongHyeon Date: Mon, 1 Nov 2010 10:30:36 -0700 To: Rick Macklem Message-ID: <20101101173036.GA1433@michelle.cdnetworks.com> References: <1060261000.280090.1288561617454.JavaMail.root@erie.cs.uoguelph.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1060261000.280090.1288561617454.JavaMail.root@erie.cs.uoguelph.ca> User-Agent: Mutt/1.4.2.3i Cc: freebsd-current@freebsd.org Subject: Re: re(4) driver dropping packets when reading NFS files X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: pyunyh@gmail.com List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Nov 2010 17:30:49 -0000 On Sun, Oct 31, 2010 at 05:46:57PM -0400, Rick Macklem wrote: > I recently purchased a laptop that has a re(4) Realtek 8101E/8102E/8103E net > chip in it and I find that it is dropping packets like crazy when reading > files over an NFS mount. (It seems that bursts of receive traffic cause it, > since when I look over wireshark, typically the 2nd packet in a read reply > is not received, although it was sent at the other end.) > Are you using NFS over UDP? > Adding "options DEVICE_POLLING" helps a lot. (ie. order of magnitude faster > reading) Does this hint that interrupts are being lost or delayed too much? > Actually I'm not a fan of polling(4) but re(4) controllers might be exceptional one due to controller limitation but order of magnitude faster indicates something is wrong in driver. > Anyhow, if anyone has an idea on what the cause/fix might be or are familiar > with the driver/hardware, I'd appreciate hearing about it. > AFAIK re(4) controllers lacks interrupts moderation so re(4) used to rely on taskqueue to reduce number of interrupts. It was written long time ago by Bill and I'm not sure whether it's still valid for recent PCIe RealTek controllers. One of problem is getting stand-alone PCIe controllers in market and I was not able to buy recent controllers. This is one of reason why re(4) still lacks TSO, jumbo frame and 64bit DMA support for newer controllers. Another problem is RealTek no longer releases data sheet so it's hard to write new features that may present on recent controllers. Recent re(4) controllers started to support small set of hardware MAC statistics counters and that may help to understand how many frames were lost under heavy load. I'll let you know when I have a patch for that. Flow-control may also enhance performance a little bit but it was not implemented yet like most other consumer grade ethernet drivers. But this may change in near future, marius@ is actively working on this so we'll get generic flow-control framework in tree. I'll see what can be done in interrupt handler and I'll let you know when patch is ready. > Thanks, rick > ps: This laptop is running a low end AMD cpu and I did install amd64 on it, > instead of i386, in case that might be relevent? I don't think so.