netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Brian Haley <brian.haley@hp.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: [PATCH] change netfilter tunables to __read_mostly
Date: Fri, 01 Sep 2006 18:37:40 +0200	[thread overview]
Message-ID: <44F861D4.9050208@trash.net> (raw)
In-Reply-To: <44F85276.1020804@hp.com>

Brian Haley wrote:
> Change some netfilter tunables to __read_mostly.  Also fixed some
> incorrect file reference comments while I was in there.

Please send these kind of patches for netfilter to me so I can
make sure they don't clash with other pending patches.

> (this will be my last __read_mostly patch unless someone points out
> something else that needs it)

This seems to be a bit random, there are quite a few more candidates for
__read_mostly right next to the ones you marked.

> diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
> index 8f22619..3b64dbe 100644
> --- a/net/netfilter/nf_conntrack_core.c
> +++ b/net/netfilter/nf_conntrack_core.c
> @@ -77,12 +77,12 @@ LIST_HEAD(nf_conntrack_expect_list);
>  struct nf_conntrack_protocol **nf_ct_protos[PF_MAX];

Like this one

>  struct nf_conntrack_l3proto *nf_ct_l3protos[PF_MAX];

and this one

>  static LIST_HEAD(helpers);

and this one

> -unsigned int nf_conntrack_htable_size = 0;
> -int nf_conntrack_max;
> +unsigned int nf_conntrack_htable_size __read_mostly = 0;
> +int nf_conntrack_max __read_mostly;
>  struct list_head *nf_conntrack_hash;

and this one

>  static kmem_cache_t *nf_conntrack_expect_cachep;

and this one

>  struct nf_conn nf_conntrack_untracked;
> -unsigned int nf_ct_log_invalid;
> +unsigned int nf_ct_log_invalid __read_mostly;
>  static LIST_HEAD(unconfirmed);
>
>  static int nf_conntrack_vmalloc;

and this one

Same ones in ip_conntrack.

>  /* Log invalid packets of a given protocol */
> diff --git a/net/ipv4/netfilter/ip_queue.c b/net/ipv4/netfilter/ip_queue.c
> index 276a964..80060cb 100644
> --- a/net/ipv4/netfilter/ip_queue.c
> +++ b/net/ipv4/netfilter/ip_queue.c
> @@ -53,7 +53,7 @@ struct ipq_queue_entry {
>  typedef int (*ipq_cmpfn)(struct ipq_queue_entry *, unsigned long);
>  
>  static unsigned char copy_mode = IPQ_COPY_NONE;
> -static unsigned int queue_maxlen = IPQ_QMAX_DEFAULT;
> +static unsigned int queue_maxlen __read_mostly = IPQ_QMAX_DEFAULT;
>  static DEFINE_RWLOCK(queue_lock);
>  static int peer_pid;
>  static unsigned int copy_range;

Basically all these variables besides the lock are candidates.


  reply	other threads:[~2006-09-01 16:40 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-01 15:32 [PATCH] change netfilter tunables to __read_mostly Brian Haley
2006-09-01 16:37 ` Patrick McHardy [this message]
2006-09-01 16:43   ` Patrick McHardy
2006-09-01 17:39     ` Brian Haley
2006-09-02 12:15       ` Patrick McHardy
2006-09-18  7:05 ` 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=44F861D4.9050208@trash.net \
    --to=kaber@trash.net \
    --cc=brian.haley@hp.com \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.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).