mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@au1.ibm.com>
To: Ravikiran G Thirumalai <kiran@in.ibm.com>
Cc: Andrew Morton <akpm@digeo.com>,
	linux-kernel@vger.kernel.org,
	David Mosberger-Tang <davidm@hpl.hp.com>
Subject: Re: [PATCH 4/3] Replace dynamic percpu implementation
Date: Fri, 23 May 2003 09:56:01 +1000	[thread overview]
Message-ID: <20030523014454.AE3401A0F1@ozlabs.au.ibm.com> (raw)
In-Reply-To: Your message of "Thu, 22 May 2003 16:19:44 +0530." <20030522104944.GE27614@in.ibm.com>

In message <20030522104944.GE27614@in.ibm.com> you write:
> On Thu, May 22, 2003 at 06:36:31PM +1000, Rusty Russell wrote:
> > Interesting: personally I consider the cacheline sharing a feature,
> > and unless you've done something special, the static declaration
> > should be interlaced too, no?
> 
> Yes, the static declartion was interlaced too. What I meant to say is that
> cacheline sharing feature helped alloc_percpu/static percpu, compensate
> for the small extra memory reference cost in getting __percpu_offset[]
> when you compare with kmalloc_percpu_new.

Ah, thanks, that clarifies.  Sorry for my misread.

> > Aside: if kmalloc_percpu uses the per-cpu offset too, it probably
> > makes sense to make the per-cpu offset to a first class citizen, and
> > smp_processor_id to be derived, rather than the other way around as at
> > the moment.  This would offer further speedup by removing a level of
> > indirection.
> > 
> > If you're interested I can probably produce such a patch for x86...
> 
> Sure, it might help per-cpu data but will it cause performance
> regression elsewhere? (other users of smp_processor_id).

AFAICT, all the time-critical smp_processor_id() things are basically
for indexing into a per-cpu data array.  Even things like module.h and
percpu_counter.h would benifit from replacing those huge
inside-structure [NR_CPUS] arrays with a dynamic allocation.

> I can run it through the same tests and find out.  Maybe it'll make
> good paper material for later? ;)

I'll try to find time today or early next week.

Thanks!
Rusty.
--
  Anyone who quotes me in their sig is an idiot. -- Rusty Russell.

  reply	other threads:[~2003-05-23  1:33 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-20  4:32 Rusty Russell
2003-05-21 10:31 ` Dipankar Sarma
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 [this message]
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=20030523014454.AE3401A0F1@ozlabs.au.ibm.com \
    --to=rusty@au1.ibm.com \
    --cc=akpm@digeo.com \
    --cc=davidm@hpl.hp.com \
    --cc=kiran@in.ibm.com \
    --cc=linux-kernel@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

all inboxes | Powered by JetHome®