Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757819Ab2FGVi3 (ORCPT ); Thu, 7 Jun 2012 17:38:29 -0400 Received: from mga03.intel.com ([143.182.124.21]:10863 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757577Ab2FGVi2 (ORCPT ); Thu, 7 Jun 2012 17:38:28 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.71,315,1320652800"; d="asc'?scan'208";a="153137732" Message-ID: <4FD11F49.5060805@gmail.com> Date: Thu, 07 Jun 2012 14:38:17 -0700 From: Jeff Kirsher Reply-To: jeffrey.t.kirsher@intel.com User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1 MIME-Version: 1.0 To: Roman Kagan CC: stable@vger.kernel.org, Jeff Kirsher , Jesse Brandeburg , Bruce Allan , Carolyn Wyborny , Don Skidmore , Greg Rose , PJ Waskiewicz , Alex Duyck , John Ronciak , Dean Nelson , "David S. Miller" , e1000-devel@lists.sourceforge.net, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] e1000: save skb counts in TX to avoid cache misses References: In-Reply-To: X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigE642B2980386C2A2F2126EEB" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3439 Lines: 85 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigE642B2980386C2A2F2126EEB Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 06/07/2012 05:49 AM, Roman Kagan wrote: > [Upstream commit 31c15a2f24ebdab14333d9bf5df49757842ae2ec with paths > adjusted to compensate for the drivers/net/ethernet/intel reorg in > dee1ad47f2ee75f5146d83ca757c1b7861c34c3b] > > Author: Dean Nelson > Date: Thu Aug 25 14:39:24 2011 +0000 > > e1000: save skb counts in TX to avoid cache misses > > Virtual Machines with emulated e1000 network adapter running on Par= allels' > server were seeing kernel panics due to the e1000 driver dereferenc= ing an > unexpected NULL pointer retrieved from buffer_info->skb. > > The problem has been addressed for the e1000e driver, but not for t= he e1000. > Since the two drivers share similar code in the affected area, a po= rt of the > following e1000e driver commit solves the issue for the e1000 drive= r: > > commit 9ed318d546a29d7a591dbe648fd1a2efe3be1180 > Author: Tom Herbert > Date: Wed May 5 14:02:27 2010 +0000 > > e1000e: save skb counts in TX to avoid cache misses > > In e1000_tx_map, precompute number of segements and bytecounts = which > are derived from fields in skb; these are stored in buffer_info= =2E When > cleaning tx in e1000_clean_tx_irq use the values in the associa= ted > buffer_info for statistics counting, this eliminates cache miss= es > on skb fields. > > Signed-off-by: Dean Nelson > Acked-by: Jeff Kirsher > Signed-off-by: David S. Miller > Signed-off-by: Roman Kagan > --- > drivers/net/e1000/e1000.h | 2 ++ > drivers/net/e1000/e1000_main.c | 18 +++++++++--------- > 2 files changed, 11 insertions(+), 9 deletions(-) Thanks! I have applied the patch to my queue --------------enigE642B2980386C2A2F2126EEB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQIcBAEBCgAGBQJP0R9JAAoJEOVv75VaS+3O2jMP/1J+t5MfKY19/RyWFG/qHz5b 4QWZWuqKOL9hghK2e2fkYfFCrvrk0EKGUG1tKbI/AUA49LI+7ywK2Fhpv5wYebBa Tj2AkVxN08UeB8DQzqqyTqoMwhJvbpWT6o8BM04mk49dEldwNo5FoXOuj16ymvLU ju5il9SRm3LZWN2BMZT3Bf3Lp1dTC4mHmx4pLjwigaEAu/jVJT0sY2TURA3jvwg6 Ov+497Ygoo8Am8T4CkcE5S4Vnne6rxk740tWcWy8AR04+F3oadWiRnqiRXideYE3 tEOZgLLnMkEtaMunLQZ8lgXv3zC56sbx+X+napEopqoQPsKxh1QdLJ+7SNcVB9x5 iPOo3gKcp6NkdV4sAnw8vFNcr1BuQ9r7poXCbJWVvDAaItpRpmuDIAqsnoeaxqrt knuWjyX0X96xOGvcgJ8BcV9C/US3VSLhkeSBv/YUo8jgkfbx4xRqxql57JiqmnEt kYMaDzoKdjP3JYdXd53b13IICancRGAkwv7/udyaYSVWoqA4d/+ASqyyniZPaQ6a FluPhI1re3QOUEOatrfAiC34IK7TlHtgA0LniLc6jPYuuet9wH6TEtVJiDE4I85S LTqqnhKpC0OnZw6eZ/3oK94L4F0A5HfWIX/c76xOL+Q30xu2o16LByCTNi4VZUWC TLck42Sf4DgoEdiqobFy =T082 -----END PGP SIGNATURE----- --------------enigE642B2980386C2A2F2126EEB-- -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/