netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Dumazet <dada1@cosmosbay.com>
To: David Miller <davem@davemloft.net>
Cc: shemminger@linux-foundation.org, netdev@vger.kernel.org
Subject: about : [NET]: Replace CONFIG_NET_DEBUG with sysctl.
Date: Fri, 09 Mar 2007 07:34:15 +0100	[thread overview]
Message-ID: <45F0FFE7.1080304@cosmosbay.com> (raw)
In-Reply-To: <20070308.204209.69409441.davem@davemloft.net>

[-- Attachment #1: Type: text/plain, Size: 926 bytes --]

Hello David and Stephen

I see git commit 8e2101a9faab43dcf307d46784a1ede7997fe729
and its potential problems :

Here on my x86_64 machine :

ffffffff806e7520 d rtnl_mutex
ffffffff806e7538 D net_msg_cost
ffffffff806e753c D net_msg_burst
ffffffff806e7540 D net_msg_warn
ffffffff806e7560 d lweventlist_lock

So net_msg_{cost|burst|warn} are on two 'heavy' cachelines.

I gently ask that any new sysctl is '__read_mostly' tagged.

After this patch applied, this looks much better :

ffffffff80725d20 d ifla_policy
ffffffff80725d68 D net_msg_cost
ffffffff80725d6c D net_msg_burst
ffffffff80725d70 D net_msg_warn
ffffffff80725d78 d flow_cachep
ffffffff80725d80 d nla_attr_minlen
ffffffff80725da0 d ctrl_policy

Thank you
Eric

[PATCH] NET : New sysctls should use __read_mostly tags

net_msg_warn should be placed in the read_mostly section, to avoid performance 
problems on SMP

Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

[-- Attachment #2: net_msg_warn_readmostly.patch --]
[-- Type: text/plain, Size: 449 bytes --]

diff --git a/net/core/utils.c b/net/core/utils.c
index 34f0810..adecfd2 100644
--- a/net/core/utils.c
+++ b/net/core/utils.c
@@ -30,9 +30,9 @@ #include <asm/byteorder.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
 
-int net_msg_cost = 5*HZ;
-int net_msg_burst = 10;
-int net_msg_warn = 1;
+int net_msg_cost __read_mostly = 5*HZ;
+int net_msg_burst __read_mostly = 10;
+int net_msg_warn __read_mostly = 1;
 EXPORT_SYMBOL(net_msg_warn);
 
 /*

  reply	other threads:[~2007-03-09  6:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-03-08 20:52 [PATCH 0/8] net-2.6.22 spring cleaning Stephen Hemminger
2007-03-08 20:52 ` [PATCH 1/8] udp: ipv4 whitespace cleanup Stephen Hemminger
2007-03-09  4:42   ` David Miller
2007-03-09  6:34     ` Eric Dumazet [this message]
2007-03-09  6:37       ` about : [NET]: Replace CONFIG_NET_DEBUG with sysctl David Miller
2007-03-09  6:59         ` Eric Dumazet
2007-03-09  7:14           ` David Miller
2007-03-09  7:51             ` Eric Dumazet
2007-03-09  7:55               ` David Miller
2007-03-09  7:58                 ` Eric Dumazet
2007-03-09 16:15           ` Stephen Hemminger
2007-03-09 16:22       ` Stephen Hemminger
2007-03-09 18:06       ` Stephen Hemminger
2007-03-08 20:52 ` [PATCH 2/8] udp: ipv6 style cleanup Stephen Hemminger
2007-03-09  4:42   ` David Miller
2007-03-08 20:52 ` [PATCH 3/8] network core: whitespace cleanup Stephen Hemminger
2007-03-09  4:43   ` David Miller
2007-03-08 20:52 ` [PATCH 4/8] wireless: use ARRAY_SIZE() Stephen Hemminger
2007-03-09  4:43   ` David Miller
2007-03-08 20:52 ` [PATCH 5/8] ipv4 cleanup Stephen Hemminger
2007-03-09  4:44   ` David Miller
2007-03-08 20:52 ` [PATCH 6/8] tcp: whitespace cleanup Stephen Hemminger
2007-03-09  4:45   ` David Miller
2007-03-08 20:52 ` [PATCH 7/8] net: deinline some functions Stephen Hemminger
2007-03-09  4:46   ` David Miller
2007-03-08 20:52 ` [PATCH 8/8] udp: deinline Stephen Hemminger
2007-03-09  4:46   ` David Miller

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=45F0FFE7.1080304@cosmosbay.com \
    --to=dada1@cosmosbay.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=shemminger@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).