From patchwork Fri Jul 16 12:20:42 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Eric Dumazet X-Patchwork-Id: 59096 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id EC5C01007E5 for ; Fri, 16 Jul 2010 22:21:16 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965300Ab0GPMUs (ORCPT ); Fri, 16 Jul 2010 08:20:48 -0400 Received: from mail-wy0-f174.google.com ([74.125.82.174]:63232 "EHLO mail-wy0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965291Ab0GPMUr (ORCPT ); Fri, 16 Jul 2010 08:20:47 -0400 Received: by wyb42 with SMTP id 42so1703692wyb.19 for ; Fri, 16 Jul 2010 05:20:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:subject:from:to:cc :in-reply-to:references:content-type:date:message-id:mime-version :x-mailer:content-transfer-encoding; bh=+LKKmhBsqwwcrLxt28kSZGycab1W5PHkJE6sKUFFbnI=; b=rzldJmeRb8adRrUniNI2y157NHFYxWD+ph1ldp9B6oNM4kZVumL7dRT7O6NuZ3r//z p60ZNPtjPmRSKToXrv/qQZFsXG54aXYYftVuT+alJWqSJTl1gNytTXgGe7T/L/EaHg64 nEcP+TRm5Utx100FigG7+mdYqDbGRjLdW1fq4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:cc:in-reply-to:references:content-type:date :message-id:mime-version:x-mailer:content-transfer-encoding; b=WoMDjflwpGcusW5IHrUSN4BV9TpXy6rghb9F90vDx6TXVvDG5d1pGqfvftSm3Bgx8Y Tiz7x5jMVQz67bA2AmFe58RXaWrEkKjY6qlJw044o300nprBNMpFC/4UhmXv1GmdH/i8 prvmbXYj/1vH77o9U3t8SvJkVVfDQycWNNkpo= Received: by 10.216.237.100 with SMTP id x78mr726893weq.114.1279282845742; Fri, 16 Jul 2010 05:20:45 -0700 (PDT) Received: from [127.0.0.1] ([85.17.35.125]) by mx.google.com with ESMTPS id p45sm719097weq.21.2010.07.16.05.20.44 (version=SSLv3 cipher=RC4-MD5); Fri, 16 Jul 2010 05:20:44 -0700 (PDT) Subject: Re: Badness with the kernel version 2.6.35-rc1-git1 running on P6 box From: Eric Dumazet To: divya Cc: LKML , linuxppc-dev@ozlabs.org, sachinp@linux.vnet.ibm.com, benh@kernel.crashing.org, netdev , David Miller , Jan-Bernd Themann In-Reply-To: <1279274185.2549.14.camel@edumazet-laptop> References: <4C401D56.3070108@linux.vnet.ibm.com> <1279274185.2549.14.camel@edumazet-laptop> Date: Fri, 16 Jul 2010 14:20:42 +0200 Message-ID: <1279282842.2549.16.camel@edumazet-laptop> Mime-Version: 1.0 X-Mailer: Evolution 2.28.3 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Le vendredi 16 juillet 2010 à 11:56 +0200, Eric Dumazet a écrit : > [PATCH] ehea: ehea_get_stats() should use GFP_KERNEL > > ehea_get_stats() is called in process context and should use GFP_KERNEL > allocation instead of GFP_ATOMIC. > > Clearing stats at beginning of ehea_get_stats() is racy in case of > concurrent stat readers. > > get_stats() can also use netdev net_device_stats, instead of a private > copy. > > Reported-by: divya > Signed-off-by: Eric Dumazet > --- > drivers/net/ehea/ehea.h | 1 - > drivers/net/ehea/ehea_main.c | 6 ++---- > 2 files changed, 2 insertions(+), 5 deletions(-) > > Hmm, net-next-2.6 contains following patch : commit 3d8009c780ee90fccb5c171caf30aff839f13547 Author: Brian King Date: Wed Jun 30 11:59:12 2010 +0000 ehea: Allocate stats buffer with GFP_KERNEL Since ehea_get_stats calls ehea_h_query_ehea_port, which can sleep, we can also sleep when allocating a page in this function. This fixes some memory allocation failure warnings seen under low memory conditions. Signed-off-by: Brian King Signed-off-by: David S. Miller goto out; --- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/net/ehea/ehea_main.c b/drivers/net/ehea/ehea_main.c index 8b92acb..3beba70 100644 --- a/drivers/net/ehea/ehea_main.c +++ b/drivers/net/ehea/ehea_main.c @@ -335,7 +335,7 @@ static struct net_device_stats *ehea_get_stats(struct net_device *dev) memset(stats, 0, sizeof(*stats)); - cb2 = (void *)get_zeroed_page(GFP_ATOMIC); + cb2 = (void *)get_zeroed_page(GFP_KERNEL); if (!cb2) { ehea_error("no mem for cb2");