From: Ingo Molnar <mingo@elte.hu>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>,
Andi Kleen <andi@firstfloor.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 2/2] x86: implement multiple queues for smp function call IPIs
Date: Fri, 1 Aug 2008 00:42:02 +0200 [thread overview]
Message-ID: <20080731224202.GB22426@elte.hu> (raw)
In-Reply-To: <48923B7A.3020805@goop.org>
* Jeremy Fitzhardinge <jeremy@goop.org> wrote:
>> So this _has_ to be approached defensively. It _should_ work, and i'm
>> all in favor of utilizing hardware resources more fully, but it's an
>> entirely new mode of operation for the hardware. I think a Kconfig
>> option (which defaults to off), and a boot option to disable it would
>> be nice, so that we can introduce this gently, at least initially.
>> Then when we see that it's 100% trouble-free we can flip around the
>> default.
>
> As Andi pointed out, this is more or less functionally identical to
> the code I ripped out of tlb_64.c, so this mode of operation has had
> lots of exposure on the 64-bit side. Because the number of queues is
> a CONFIG variable, it would be relatively easy to make it a real
> config option, and/or use different numbers for 32 and 64-bit.
> Choosing 1 as the number of queues will make it behave exactly as the
> current code does.
>
> I'm not really familiar with all the ins and outs of apic bugs.
> What's the issue you're concerned about?
Yes on the 64-bit side we've had NUM_INVALIDATE_TLB_VECTORS (==8) for a
long time, but note that 64-bit is obviously for more modern CPUs. What
i'm mindful about (i'm not _that_ worried) are fragile APICs and unknown
erratas.
The other issue is that the concurrency pattern changes somewhat and
becomes more agressive. The existing 64-bit special-purpose TLB flush
code uses in essence synchronous waiting for that specific IPI that
belongs to that CPU, it sends the IPI then waits for the acknowledgement
by polling the flush mask:
send_IPI_mask(cpumask, INVALIDATE_TLB_VECTOR_START + sender);
while (!cpus_empty(f->flush_cpumask))
cpu_relax();
while with generic IPIs we could have asynchronous IPIs as well.
So with the TLB flush code there's never any true "multiple outstanding
IPIs" scenario for the same IPI, for 8 CPUs and fewer. (which is the
predominant majority of existing hardware)
> It also occurred to me that it might be more interesting to
> parameterise the queues - and the mapping of cpus->queues - in a more
> topology-aware way than simply NQUEUES=NCPUS/x, queue=cpuid % NQUEUES.
> But I haven't given it much thought.
i'd suggest we keep it at the current simple modulo rule.
Ingo
next prev parent reply other threads:[~2008-07-31 22:42 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-29 23:32 Jeremy Fitzhardinge
2008-07-29 23:43 ` Jeremy Fitzhardinge
2008-07-30 0:13 ` Andi Kleen
2008-07-30 0:44 ` Jeremy Fitzhardinge
2008-07-30 4:55 ` Nick Piggin
2008-07-31 22:08 ` Ingo Molnar
2008-07-31 22:12 ` Andi Kleen
2008-07-31 22:23 ` Jeremy Fitzhardinge
2008-07-31 22:42 ` Ingo Molnar [this message]
2008-08-01 4:58 ` Jeremy Fitzhardinge
2008-08-01 9:09 ` Ingo Molnar
2008-08-01 14:17 ` 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=20080731224202.GB22426@elte.hu \
--to=mingo@elte.hu \
--cc=andi@firstfloor.org \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nickpiggin@yahoo.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 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®