From: Dipankar Sarma <dipankar@in.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@digeo.com>,
linux-kernel@vger.kernel.org,
David Mosberger-Tang <davidm@hpl.hp.com>,
Ravikiran G Thirumalai <kiran@in.ibm.com>
Subject: Re: [PATCH 4/3] Replace dynamic percpu implementation
Date: Wed, 21 May 2003 16:01:56 +0530 [thread overview]
Message-ID: <20030521103156.GB2861@in.ibm.com> (raw)
In-Reply-To: <20030520043332.E80372C09D@lists.samba.org>
On Tue, May 20, 2003 at 02:32:37PM +1000, Rusty Russell wrote:
> This requires the first three patches. IA64 untested. See comment.
>
> Name: Dynamic per-cpu allocation using static per-cpu mechanism
> Author: Rusty Russell
> Status: Tested on 2.5.69-bk13
> Depends: Misc/kmalloc_percpu-interface.patch.gz
>
> D: This patch replaces the dynamic per-cpu allocator, alloc_percpu,
> D: to make it use the same mechanism as the static per-cpu variables, ie.
> D: ptr + __per_cpu_offset[smp_processor_id()] gives the variable address.
> D: This allows it to be used in modules (following patch), and hopefully
> D: increases space and time efficiency of reference at the same time.
> D: It gets moved to its own (SMP-only) file: mm/percpu.c.
We will do some measurements with this but based on a large number
of measurements that Kiran had done earlier, we can see a couple of things -
1. Even though a percpu scheme using pointer arithmatic has one less memory
reference, the globally shared offset table is often in the cache
and therefore pointer arithmatic offers no added advantage.
2. Increased sharing of cacheline helps by reducing associativity misses.
We see this by comparing an interlaced allocator where only same
sized objects share blocks vs. the current static allocator. Sharing of
blocks by differently sized objects also allow cache lines to be
kept warm as more subsystems in the kernel access them.
Considering these results, this allocator seems to be a step in the right
direction.
Thanks
Dipankar
next prev parent reply other threads:[~2003-05-21 10:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-05-20 4:32 [PATCH 4/3] Replace dynamic percpu implementation Rusty Russell
2003-05-21 10:31 ` Dipankar Sarma [this message]
2003-05-22 0:35 ` Rusty Russell
2003-05-22 8:14 ` Ravikiran G Thirumalai
2003-05-22 8:36 ` Rusty Russell
2003-05-22 10:49 ` Ravikiran G Thirumalai
2003-05-22 23:56 ` Rusty Russell
2003-05-23 7:23 ` Rusty Russell
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=20030521103156.GB2861@in.ibm.com \
--to=dipankar@in.ibm.com \
--cc=akpm@digeo.com \
--cc=davidm@hpl.hp.com \
--cc=kiran@in.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
/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.