All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@suse.de>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: Linus Torvalds <torvalds@osdl.org>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	jketreno@linux.intel.com, Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] kill massive wireless-related log spam
Date: Wed, 26 Oct 2005 17:04:14 +0200	[thread overview]
Message-ID: <200510261704.15366.ak@suse.de> (raw)
In-Reply-To: <20051026042827.GA22836@havoc.gtf.org>

On Wednesday 26 October 2005 06:28, Jeff Garzik wrote:

> Change this to printing out the message once, per kernel boot.

It doesn't do that. It prints it once every 2^32 calls. Also
the ++ causes unnecessary dirty cache lines in normal operation.

-Andi
> 
> diff --git a/net/core/wireless.c b/net/core/wireless.c
> index d17f158..271ddb3 100644
> --- a/net/core/wireless.c
> +++ b/net/core/wireless.c
> @@ -455,10 +455,15 @@ static inline struct iw_statistics *get_
>  
>  	/* Old location, field to be removed in next WE */
>  	if(dev->get_wireless_stats) {
> -		printk(KERN_DEBUG "%s (WE) : Driver using old /proc/net/wireless support, please fix driver !\n",
> -		       dev->name);
> +		static int printed_message;
> +
> +		if (!printed_message++)
> +			printk(KERN_DEBUG "%s (WE) : Driver using old /proc/net/wireless support, please fix driver !\n",
> +				dev->name);
> +
>  		return dev->get_wireless_stats(dev);
>  	}
> +

  reply	other threads:[~2005-10-26 15:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-26  4:28 [PATCH] kill massive wireless-related log spam Jeff Garzik
2005-10-26 15:04 ` Andi Kleen [this message]
2005-10-26 15:23   ` Jesper Juhl
2005-10-26 21:23     ` J.A. Magallon
2005-10-26 21:43       ` Jesper Juhl
2005-10-26 15:42   ` Jeff Garzik
2005-10-27 17:37     ` Horst von Brand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200510261704.15366.ak@suse.de \
    --to=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=jgarzik@pobox.com \
    --cc=jketreno@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.