All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: dada1@cosmosbay.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] NET : convert ip_rt_acct to per_cpu variables
Date: Fri, 16 Nov 2007 01:12:43 -0800 (PST)	[thread overview]
Message-ID: <20071116.011243.48184084.davem@davemloft.net> (raw)
In-Reply-To: <20071116095903.d2ef9c14.dada1@cosmosbay.com>

From: Eric Dumazet <dada1@cosmosbay.com>
Date: Fri, 16 Nov 2007 09:59:03 +0100

> [PATCH] NET : NET_CLS_ROUTE : convert ip_rt_acct to per_cpu variables
> 
> ip_rt_acct needs 4096 bytes per cpu to perform some accounting.
> It is actually allocated as a single huge array [4096*NR_CPUS]
> (rounded up to a power of two)
> 
> Converting it to a per cpu variable is wanted to :
>  - Save space on machines were num_possible_cpus() < NR_CPUS
>  - Better NUMA placement (each cpu gets memory on its node)
> 
> Signed-off-by: Eric Dumazet <dada1@cosmosbay.com>

This is better in one sense but worse in another.

At least the previous code dynamically allocated the thing,
now at least one copy is taking up core kernel text image
space.

I think it's an alloc_percpu() candidate, what do you think?

  reply	other threads:[~2007-11-16  9:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-16  8:59 [PATCH] NET : convert ip_rt_acct to per_cpu variables Eric Dumazet
2007-11-16  9:12 ` David Miller [this message]
2007-11-16  9:35   ` Eric Dumazet
2007-11-16 10:58     ` Eric Dumazet
2007-11-16 11:32       ` 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=20071116.011243.48184084.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=dada1@cosmosbay.com \
    --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 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.