From owner-freebsd-net@FreeBSD.ORG Fri Jan 18 14:50:11 2013 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1E51F8AC for ; Fri, 18 Jan 2013 14:50:11 +0000 (UTC) (envelope-from barney_cordoba@yahoo.com) Received: from nm24.bullet.mail.ne1.yahoo.com (nm24.bullet.mail.ne1.yahoo.com [98.138.90.87]) by mx1.freebsd.org (Postfix) with ESMTP id DA78AD8D for ; Fri, 18 Jan 2013 14:50:09 +0000 (UTC) Received: from [98.138.226.179] by nm24.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 14:50:03 -0000 Received: from [98.138.87.7] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 14:50:03 -0000 Received: from [127.0.0.1] by omp1007.mail.ne1.yahoo.com with NNFMP; 18 Jan 2013 14:50:03 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 643241.45315.bm@omp1007.mail.ne1.yahoo.com Received: (qmail 86330 invoked by uid 60001); 18 Jan 2013 14:50:03 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1358520603; bh=WUOn90E/92tTghESQ+WasvtE2l5LKbkVm9qAy0nMfjY=; 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=1I59ST/0NCV4h67OzMz2seowITnfNu3/Li1wy1y11OrGtpURIZ3UDDCcBkDc/CRDVracq0uY+3tI2wz8MAzwBjDwtMP3O+/0DtQuWrZmo3VkkS/LL/nBr1Ls/9G3jhLZ7kiF6zCNfraLPjUzcsZ8g/cwoZkTzUwH8H/wyCXJt1k= 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=KUc68xEyHqywsMZ27RVcTq8g00x2HaYr3B7ECxOLIdu4/PUl5OO1ExeBWB4sMk2Khi9nZTjxVXkFy33CDBfs93e/gRpVhbXwiXZFpibgxN4Ir4cnC65lqfKdcnY7GzfOCyBi4D6Cybgh/D/MouIFnlugqI0S/5WZBqXd4FcaFDo=; X-YMail-OSG: 6L1ZSF4VM1nBc9PfJFkUV8nSKdX07d2QerNZUuIFQUrxLdM dABmqxB0wRdAfOnbBlrs6wnYsqZoqZLUTD2BwZrlubystPUlsH1dZvoZ_dis fRrvo9ubwlOgxaKgRv_3Rv2gwymmh_hgVVkh4IC2BzxTy7eMaaeKSvagQxnz vDJb9J1gAbbGs0IMIBoNaRfte6KZ7BKT44Bx_jjDSBMyFQGvYaycu9gOTHOr wg97SrOcY1_C_f_9FTA660aMGlSQQn68P5J9ruae8xZFiG2iz3fiV1qZEepG FDCHJoLLUawfe_I5O1R_Fft4UybyIamLeU.NKD5.pUahv2FdbABYlRPnTqjC urCua5.3xtDw1a3gkUGPjAi7MlQN_q0uQ09YzQCDJ4Vq1UIzXsbEpgJbXjr0 Ej1Ec0md9WPS2aJ4RCm3ZoJebgRHieW4TnvTRnJa6SfRftJu7.wQOaDlDi7a 6WByaWOlc32nJAFUMw8df9qTB2DGtR.mdLhs90y._JxX5LDNsBGQIHmVht21 mmsRd8oYoS3kN7in9t_22Qy_XleDr Received: from [174.48.128.27] by web121606.mail.ne1.yahoo.com via HTTP; Fri, 18 Jan 2013 06:50:03 PST X-Rocket-MIMEInfo: 001.001, DQo.IHRoZSBwcm9ibGVtIGkgd2FzIGFjdHVhbGx5IHNlZWluZyBhcmUgc2xpZ2h0bHkgZGlmZmVyZW50LA0KPiBuYW1lbHk6DQo.IC0gb25jZSB0aGUgZHJpdmVyIGxhZ3MgYmVoaW5kLCBpdCBkb2VzIG5vdCBoYXZlIGEgY2hhbmNlIHRvDQo.IHJlY292ZXINCj4gwqAgZXZlbiBpZiB0aGVyZSBhcmUgQ1BVIGN5Y2xlcyBhdmFpbGFibGUsIGJlY2F1c2UgYm90aA0KPiBpbnRlcnJ1cHQgDQo.IMKgIHJhdGUgYW5kIHBhY2tldHMgcGVyIGludGVycnVwdCBhcmUgY2FwcGVkLg0KPiAtIG11Y2ggd29yc2UsIG9uY2UBMAEBAQE- X-Mailer: YahooMailClassic/15.1.2 YahooMailWebService/0.8.130.494 Message-ID: <1358520603.55904.YahooMailClassic@web121606.mail.ne1.yahoo.com> Date: Fri, 18 Jan 2013 06:50:03 -0800 (PST) From: Barney Cordoba Subject: Re: two problems in dev/e1000/if_lem.c::lem_handle_rxtx() To: Adrian Chadd , Luigi Rizzo In-Reply-To: <20130117174427.GA65218@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 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 14:50:11 -0000 > the problem i was actually seeing are slightly different, > namely: > - once the driver lags behind, it does not have a chance to > recover > =A0 even if there are CPU cycles available, because both > interrupt=20 > =A0 rate and packets per interrupt are capped. > - much worse, once the input stream stops, you have a huge > backlog that > =A0 is not drained. And if, say, you try to ping the > machine, > =A0 the incoming packet is behind another 3900 packets, > so the first > =A0 interrupt drains 100 (but not the ping request, so no > response), > =A0 you keep going for a while, eventually the external > world sees the > =A0 machine as not responding and stops even trying to > talk to it. 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. 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 process all of the packets in your RX queue in the interrupt window than you either need to tune your machine better or get a faster machine. When you tune the work limit you're making a decision about the trade off b= etween livelock and dropping packets. It's not an arbitrary decision. BC