From: Ingo Molnar <mingo@elte.hu>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>,
Christoph Lameter <cl@linux-foundation.org>,
Tejun Heo <tj@kernel.org>,
travis@sgi.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Andrew Morton <akpm@linux-foundation.org>,
steiner@sgi.com, Hugh Dickins <hugh@veritas.com>
Subject: Re: regarding the x86_64 zero-based percpu patches
Date: Thu, 15 Jan 2009 14:55:18 +0100 [thread overview]
Message-ID: <20090115135518.GA9263@elte.hu> (raw)
In-Reply-To: <200901151204.23208.rusty@rustcorp.com.au>
* Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Tuesday 13 January 2009 04:14:58 Eric W. Biederman wrote:
> > 2M of per cpu data doesn't make sense, and likely indicates a design
> > flaw somewhere. It just doesn't make sense to have large amounts of
> > data allocated per cpu.
> >
> > The most common user of per cpu data I am aware of is allocating one
> > word per cpu for counters.
>
> This is why I did a brief audit. Here it is:
>
> With x86/32 allyesconfig (trimmed a little, until it booted under kvm)
> we have 37148 bytes of static percpu data, and 117228 bytes of dynamic
> percpu data.
>
> File and line Number Size Total
> net/ipv4/af_inet.c:1287 21 2048 43008
> net/ipv4/af_inet.c:1290 21 2048 43008
> kernel/workqueue.c:819 72 128 9126
> net/ipv4/af_inet.c:1287 48 128 6144
> net/ipv4/af_inet.c:1290 48 128 6144
> net/ipv4/route.c:3258 1 4096 4096
> include/linux/genhd.h:271 72 40 2880
> lib/percpu_counter.c:77 194 4 776
> net/ipv4/af_inet.c:1287 1 288 288
> net/ipv4/af_inet.c:1290 1 288 288
> net/ipv4/af_inet.c:1287 1 256 256
> net/ipv4/af_inet.c:1290 1 256 256
> net/core/neighbour.c:1424 4 44 176
> kernel/kexec.c:1143 1 176 176
> net/ipv4/af_inet.c:1287 1 104 104
> net/ipv4/af_inet.c:1290 1 104 104
> arch/x86/.../acpi-cpufreq.c:528 96 1 96
> arch/x86/acpi/cstate.c:153 1 64 64
> net/.../nf_conntrack_core.c:1209 1 60 60
>
> Others: 178
>
> This is why my patch series adds "big_percpu_alloc" (basically identical
> to current code) for the bigger/unbounded users.
>
> I don't think moving per-cpu areas is going to fly. We do put complex
> datastructures in there. And you're going to need preempt_disable() on
> all per-cpu ops on many archs to make it work (assuming you use
> stop_machine to do the realloc. Even a rough audit quickly becomes
> overwhelming: 20 of the first 1/4 of DECLARE_PER_CPUs are non-movable
> datastructures.
Why do we have to move them? Even on an allyesconfig the total ~150K size
seems to be peanuts - compared to the ~+4MB CONFIG_MAXSMP .data/.bss
bloat. I must be missing something ...
Ingo
next prev parent reply other threads:[~2009-01-15 13:56 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <49649814.4040005@kernel.org>
[not found] ` <20090107120225.GA30651@elte.hu>
2009-01-07 12:13 ` regarding the x86_64 zero-based percpu patches Tejun Heo
2009-01-10 6:46 ` Rusty Russell
2009-01-12 17:23 ` Christoph Lameter
2009-01-12 17:44 ` Eric W. Biederman
2009-01-12 19:00 ` Christoph Lameter
2009-01-13 0:33 ` Tejun Heo
2009-01-13 3:01 ` Eric W. Biederman
2009-01-13 3:14 ` Tejun Heo
2009-01-13 4:07 ` Eric W. Biederman
2009-01-14 3:58 ` Tejun Heo
2009-01-15 1:47 ` Rusty Russell
2009-01-15 1:49 ` Rusty Russell
2009-01-15 20:26 ` Christoph Lameter
2009-01-15 1:34 ` Rusty Russell
2009-01-15 13:55 ` Ingo Molnar [this message]
2009-01-15 20:27 ` Christoph Lameter
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=20090115135518.GA9263@elte.hu \
--to=mingo@elte.hu \
--cc=akpm@linux-foundation.org \
--cc=cl@linux-foundation.org \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=hugh@veritas.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=steiner@sgi.com \
--cc=tj@kernel.org \
--cc=travis@sgi.com \
/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.