From owner-freebsd-net@FreeBSD.ORG Fri Jan 18 15:48:01 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 099EC6A4 for ; Fri, 18 Jan 2013 15:48:01 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from nm33-vm2.bullet.mail.ne1.yahoo.com (nm33-vm2.bullet.mail.ne1.yahoo.com [98.138.229.66]) by mx1.freebsd.org (Postfix) with ESMTP id B0EB916B for ; Fri, 18 Jan 2013 15:48:00 +0000 (UTC) Received: from [98.138.226.177] by nm33.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 15:46:05 -0000 Received: from [98.138.226.162] by tm12.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 15:46:05 -0000 Received: from [127.0.0.1] by omp1063.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 15:46:05 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 153311.10868.bm@omp1063.mail.ne1.yahoo.com Received: (qmail 85747 invoked by uid 60001); 18 Jan 2013 15:46:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1358523965; bh=0JZk4EOfZNMJ8rbxUGkRW1eYlILksAU8lxQ65wWZKZU=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=CMg1QLEvt/UWOldDAAfJXZ6y3pH/VFeMQxm0KzaaU5WOV/fgV20mECwopaDcaxciUdeXvF7gdorH79bcKD6hICO1cqid6wLPf66Zy84VX9mQwKXqf/eH/3SSGEs0Y+XmtyyxI85sPDRsAHIjgKBqVzJ4A7TL2XlnHAmHpznPcK4= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=jf4jxCXaYDR7z8wedxMhBr5ZMN/OL3uHulb0YTZoFEb3wV0GbyXCIYtxby56mjsU8ae4dNNV1/0KhjVHCgS92vp8Rf4LK4ARMc3O/S4abAiGupAIvdLDvN73BNrNCwlNQ8OIz+VCsN0p+miZk3PrePI4kDKmDziBSgY88n8pt9M=; X-YMail-OSG: nD5KSj8VM1nH4Ih7hc4r34C0oT52ysG8WG1fCs8psqJtPOY JRl04KnhFuEugGxfaBbd5tvMpH4l89SBkt1UZs7MwOGm0zbxgrVQDgl9UI02 Xr2QfHrQ9X2k8WMmtuPwrl1RUnyiUdH6BYy1_DvMtrB0HrrbZLAH_4QXVFpe axJ7PWvjcM6AWaSl.WL7aempOe0Vmv14Es87U.83e9UcoZuPLITgdkkNTCI0 ZXkULUgzvGFFp6uDeh8zX1bsJLdPDD1fmoKIfvWQF.N6lINTTWJydz9DiPNI E2NcynG1Oyt3PU32lEKolZRaATJ2Qa7TZ_UwMErnYK7MOCPtFX_jIYgXj_bJ Aa0e7WC4laPhKiLgw03Fk5D5RfdrN0wDqNm4MLeW1C4wf11vCTx9zN0O.Djk MRS6m0NvfDdhs1jcXWc1q2O0e3p4_mrMbkr9_AXn2Kdg_bbcN9o0xuJiLYkJ 8QAOTEPgy.2WnR0VPrRmSIz_Bl3.tgzkNT_7wMM3HjuwqKKqE5YCuVcNumB4 MnoXWmSMwyeqjsSlYQ45qqB6futNF Received: from [174.48.128.27] by web121601.mail.ne1.yahoo.com via HTTP; Fri, 18 Jan 2013 07:46:04 PST X-Rocket-MIMEInfo: 001.001, DQoNCi0tLSBPbiBGcmksIDEvMTgvMTMsIEx1aWdpIFJpenpvIDxyaXp6b0BpZXQudW5pcGkuaXQ.IHdyb3RlOg0KDQo.IEZyb206IEx1aWdpIFJpenpvIDxyaXp6b0BpZXQudW5pcGkuaXQ.DQo.IFN1YmplY3Q6IFJlOiB0d28gcHJvYmxlbXMgaW4gZGV2L2UxMDAwL2lmX2xlbS5jOjpsZW1faGFuZGxlX3J4dHgoKQ0KPiBUbzogIkJhcm5leSBDb3Jkb2JhIiA8YmFybmV5X2NvcmRvYmFAeWFob28uY29tPg0KPiBDYzogIkFkcmlhbiBDaGFkZCIgPGFkcmlhbkBmcmVlYnNkLm9yZz4sIGZyZWVic2QtbmV0QGZyZWUBMAEBAQE- X-Mailer: YahooMailClassic/15.1.2 YahooMailWebService/0.8.130.494 Message-ID: <1358523964.72178.YahooMailClassic@web121601.mail.ne1.yahoo.com> Date: Fri, 18 Jan 2013 07:46:04 -0800 (PST) From: Barney Cordoba Subject: Re: two problems in dev/e1000/if_lem.c::lem_handle_rxtx() To: Luigi Rizzo In-Reply-To: <20130118145944.GA68125@onelab2.iet.unipi.it> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-net@freebsd.org, Adrian Chadd 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: Fri, 18 Jan 2013 15:48:01 -0000 --- On Fri, 1/18/13, Luigi Rizzo wrote: > From: Luigi Rizzo > Subject: Re: two problems in dev/e1000/if_lem.c::lem_handle_rxtx() > To: "Barney Cordoba" > Cc: "Adrian Chadd" , freebsd-net@freebsd.org > Date: Friday, January 18, 2013, 9:59 AM > On Fri, Jan 18, 2013 at 06:50:03AM > -0800, Barney Cordoba wrote: > >=20 > > > the problem i was actually seeing are slightly > different, > > > namely: > > > - once the driver lags behind, it does not have a > chance to > > > recover > > > ? even if there are CPU cycles available, because > both > > > interrupt=20 > > > ? rate and packets per interrupt are capped. > > > - much worse, once the input stream stops, you > have a huge > > > backlog that > > > ? is not drained. And if, say, you try to ping > the > > > machine, > > > ? the incoming packet is behind another 3900 > packets, > > > so the first > > > ? interrupt drains 100 (but not the ping request, > so no > > > response), > > > ? you keep going for a while, eventually the > external > > > world sees the > > > ? machine as not responding and stops even trying > to > > > talk to it. > >=20 > > This is a silly example. As I said before, the 100 work > limit is=20 > > arbitrary and too low for a busy network. If you have a > backlog of > > 3900 packets with a workload of 100, then your system > is so incompetently > > tuned that it's not even worthy of discussion. > >=20 > > If you're using workload and task queues because you > don't know how to=20 > > tune moderation the process_limit, that's one > discussion. But if you can't > >=A0 process all of the packets in your RX queue in > the interrupt window than > >=A0 you either need to tune your machine better or > get a faster machine. > >=20 > > When you tune the work limit you're making a decision > about the trade off between livelock and dropping packets. > It's not an arbitrary decision. >=20 > maybe i am too incompetent to participate to this > discussion. > what do i know about this stuff, after all! Think about how much better you could do if you actually understood how it all worked? BC