From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Ingo Molnar <mingo@elte.hu>, Jens Axboe <jens.axboe@oracle.com>,
Andi Kleen <andi@firstfloor.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: x86: Is there still value in having a special tlb flush IPI vector?
Date: Tue, 29 Jul 2008 19:47:56 +1000 [thread overview]
Message-ID: <200807291947.56515.nickpiggin@yahoo.com.au> (raw)
In-Reply-To: <488EB68A.2080301@goop.org>
On Tuesday 29 July 2008 16:19, Jeremy Fitzhardinge wrote:
> Nick Piggin wrote:
> > It definitely is not a clear win. They do not have the same
> > characteristics. So numbers will be needed.
>
> > smp_call_function is now properly scalable in smp_call_function_single
> > form. The more general case of multiple targets is not so easy and it
> > still takes a global lock and touches global cachelines.
> >
> > I don't think it is a good use of time, honestly. Do you have a good
> > reason?
>
> Code cleanup, unification. It took about 20 minutes to do. It probably
OK, so nothing terribly important.
> won't take too much longer to unify kernel/tlb.c. It seems that if
> there's any performance loss in making the transition, then we can make
> it up again by tuning smp_call_function_mask, benefiting all users.
No I don't think that is the right way to go for such an important
functionality. There are no ifs, smp_call_function does touch global
cachelines and locks.
smp_call_function is barely used, as should be very obvious because it
was allowed to languish with such horrible performance for so long. So
there aren't too many users.
But if you get smp_call_function_mask performance at the same time,
then there is less to argue about I guess (although it will always
be necessarily more complex than plain tlb flushing).
> But, truth be told, the real reason is that I think there may be some
> correctness issue around smp_call_function* - I've seen occasional
> inexplicable crashes, all within generic_smp_call_function() - and I
> just can't exercise that code enough to get a solid reproducing case.
> But if it gets used for tlb flushes, then any bug is going to become
> pretty obvious. Regardless of whether these patches get accepted, I can
> use it as a test vehicle.
That's fair enough. Better still might be a test harness specifically
to exercise it.
> > No. The rewrite makes it now very good at synchronously sending a
> > function to a single other CPU.
> >
> > Sending asynchronously requires a slab allocation and then a remote slab
> > free (which is nasty for slab) at the other end, and bouncing of locks
> > and cachelines. No way you want to do that in the reschedule IPI.
> >
> > Not to mention the minor problem that it still deadlocks when called with
> > interrupts disabled ;)
>
> In the async case? Or because it can become spontaneously sync if
> there's an allocation failure?
In both sync and async case, yes.
next prev parent reply other threads:[~2008-07-29 9:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 23:16 Jeremy Fitzhardinge
2008-07-28 23:20 ` Jeremy Fitzhardinge
2008-07-29 2:12 ` Andi Kleen
2008-07-29 6:29 ` Jeremy Fitzhardinge
2008-07-29 12:02 ` Andi Kleen
2008-07-29 14:46 ` Jeremy Fitzhardinge
2008-07-29 14:58 ` Andi Kleen
2008-07-28 23:34 ` Ingo Molnar
2008-07-29 4:30 ` Nick Piggin
2008-07-29 6:19 ` Jeremy Fitzhardinge
2008-07-29 9:47 ` Nick Piggin [this message]
2008-07-29 9:54 ` Peter Zijlstra
2008-07-29 10:00 ` Nick Piggin
2008-07-29 10:04 ` Peter Zijlstra
2008-07-29 10:17 ` Nick Piggin
2008-07-29 10:23 ` Peter Zijlstra
2008-07-29 10:45 ` Peter Zijlstra
2008-07-31 16:48 ` Ingo Molnar
2008-08-01 1:32 ` Nick Piggin
2008-07-31 17:48 ` Jeremy Fitzhardinge
2008-07-31 20:57 ` Ingo Molnar
2008-07-31 21:15 ` Peter Zijlstra
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=200807291947.56515.nickpiggin@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=andi@firstfloor.org \
--cc=hpa@zytor.com \
--cc=jens.axboe@oracle.com \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.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
Powered by JetHome