From: Ingo Molnar <mingo@elte.hu>
To: Nick Piggin <npiggin@suse.de>
Cc: Andi Kleen <ak@suse.de>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-arch@vger.kernel.org
Subject: Re: [rfc][patch] x86-64 new smp_call_function design
Date: Thu, 28 Feb 2008 09:45:58 +0100 [thread overview]
Message-ID: <20080228084558.GA32631@elte.hu> (raw)
In-Reply-To: <20080227221407.GA26067@wotan.suse.de>
* Nick Piggin <npiggin@suse.de> wrote:
> On Wed, Feb 27, 2008 at 04:02:10PM +0100, Ingo Molnar wrote:
> >
> > * Nick Piggin <npiggin@suse.de> wrote:
> >
> > > > the two structures are quite similar in size and role - why not have
> > > > a type field and handle them largely together? I think we should try
> > > > to preserve a single queue and a single vector - that would remove a
> > > > number of ugly special-cases from the patch.
> > >
> > > A single queue will kill one of the big fundamental scalability
> > > improvements of the call_single. That's the problem.
> >
> > hm, indeed. Then how about the other way around: couldnt the normal
> > all-cpus SMP function call be implemented transparently via using
> > smp_call_single() calls?
>
> That's possible, but it is slower and less scalable on my 8-way, and
> I suspect it might become even slower than the generic code on larger
> systems.
i dont mean "implement call-all as a series of call-single" calls, but
use just a single queue of requests and differentiate on the data
structure level. Right now you use the vector # as the differentiator.
but ... no strong feelings, i'm just playing the devil's advocate :)
Your work is great (and i now see that i forgot to state this clearly
enough in my first mail - i thought i to be obvious, based on your
numbers!), i'm really just trying to micro-optimize the concept.
Could you try to unify it with the 32-bit code, preferably into a
separate, unified arch/x86/kernel/smp.c file? Such an approach would
make it into x86.git in a heartbeat :)
> > The vector duplication is really ugly and feels wrong.
>
> Why?
it's ~0.5% of our irq vector space? :-)
we could also try to implement a "NOP" type of single call [ using a nop
callback is one of the easiest possibilities there ;) ] - which would
allow us to eliminate the special reschedule vector as well. That means
we could consolidate all the SMP cross-calls into a single vector.
OTOH, i see how you save multiplexing/demultiplexing complexity on both
the sending and the receiving side by using the separate vectors. So i
guess, if it's fast enough, we should indeed do your two vectors
approach and also merge the reschedule special vector into the
single-call path and thus have no effect on the size of the vector
space. (no need to add a new vector even - just rename the reschedule
vector to single-call vector)
Ingo
next prev parent reply other threads:[~2008-02-28 8:46 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-27 12:42 [rfc][patch] x86-64 new smp_call_function design Nick Piggin
2008-02-27 13:04 ` Andi Kleen
2008-02-27 13:07 ` Nick Piggin
2008-02-27 13:33 ` Andi Kleen
2008-03-16 14:33 ` Avi Kivity
2008-02-27 13:27 ` Ingo Molnar
2008-02-27 13:50 ` Nick Piggin
2008-02-27 15:02 ` Ingo Molnar
2008-02-27 22:14 ` Nick Piggin
2008-02-28 8:45 ` Ingo Molnar [this message]
2008-02-28 12:55 ` Andi Kleen
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=20080228084558.GA32631@elte.hu \
--to=mingo@elte.hu \
--cc=ak@suse.de \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=npiggin@suse.de \
/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