[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m11vuwn3vu.fsf@fess.ebiederm.org>
Date: Wed, 21 Jan 2009 06:13:41 -0800
From: ebiederm@...ssion.com (Eric W. Biederman)
To: Stephen Hemminger <shemminger@...tta.com>
Cc: Tejun Heo <tj@...nel.org>, Ingo Molnar <mingo@...e.hu>,
Rusty Russell <rusty@...tcorp.com.au>,
Herbert Xu <herbert@...dor.apana.org.au>,
akpm@...ux-foundation.org, hpa@...or.com, brgerst@...il.com,
cl@...ux-foundation.org, travis@....com,
linux-kernel@...r.kernel.org, steiner@....com, hugh@...itas.com,
"David S. Miller" <davem@...emloft.net>, netdev@...r.kernel.org,
Mathieu Desnoyers <mathieu.desnoyers@...ymtl.ca>
Subject: Re: [PATCH] percpu: add optimized generic percpu accessors
Stephen Hemminger <shemminger@...tta.com> writes:
> This is crap. only a small fraction of these SNMP counters are
> close enough to the hot path to deserve per-cpu treatment.
Interesting. I was just reading af_inet.c:ipv4_mib_init_net()
to get a feel for what a large consumer of percpu counters looks
like.
I expect the patterns I saw will hold even if the base size is much
smaller.
Your statement reinforces my point that our allocations in a per cpu
area are small and our dynamic per cpu allocator is not really
optimized for small allocations.
In most places what we want are 1-5 counters, which is max 40 bytes.
And our minimum allocation is a full cache line (64-128 bytes) per
allocation.
I'm wondering if dynamic per cpu allocations should work more like
slab. Have a set of percpu base pointers for an area, and return an
area + offset in some convenient form.
Ideally we would just have one area (allowing us to keep the base
pointer in a register), but I'm not convinced that doesn't fall down
in the face of dynamic allocation.
Eric
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists