Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Mar 2016 10:45:39 -0700
From:      Adrian Chadd <adrian.chadd@gmail.com>
To:        John Baldwin <jhb@freebsd.org>
Cc:        Konstantin Belousov <kostikbel@gmail.com>, Stanislav Sedov <stas@freebsd.org>,  "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>
Subject:   Re: Peformance issues with r278325
Message-ID:  <CAJ-VmonUdHRJ0jcFphqXi1w2PwbDycLG190Yd5z8JQWGxW_1iQ@mail.gmail.com>
In-Reply-To: <8403291.NqUNo0Qq5W@ralph.baldwin.cx>
References:  <FA50A68E-7F3D-4361-8A8A-EB7F97EF3D00@FreeBSD.org> <20160317053704.GP1741@kib.kiev.ua> <8403291.NqUNo0Qq5W@ralph.baldwin.cx>

next in thread | previous in thread | raw e-mail | index | archive | help
On 17 March 2016 at 10:23, John Baldwin <jhb@freebsd.org> wrote:

>
> I had not expected this commit to have this impact, but Konstantin is correct.
> I wonder if simply reducing the DELAY() from 5 down to 1 or so would be
> sufficient?  (Note that you need to adjust the prior loop to use += 1 instead
> of += 5 in that case.)
>
> Note that DETECT_DEADLOCK is not enabled by default, so the AFTER_SPIN case
> (which waits for an IPI just sent to be delivered) shouldn't be enabled (and
> in fact I'd like to just remove that code entirely).  This means that only
> BEFORE_SPIN should be spinning, and it should only be spinning if a CPU sends
> IPIs back to back such that the previous IPI is still pending (not yet
> delivered) when the CPU wants to send another IPI.
>
> We can probably assume a TSC if we have SMP, so if changing the delay from 5
> to 1 doesn't work we can try just using the TSC directly to control the
> spin length and go back to using a simple pause.
>
> I have an old set of changes that might also be interesting that permit
> TLB shootdown IPI handlers to run while spinlocks are held (by using cr8/TPR
> to control interrupts when a spinlock is held instead of disabling all
> interrupts).  I haven't found a workload where that helped yet.  However,
> yours might be an interesting workload to try those changes out on.

Do you think it's worth just reverting it for now just so it lands in
10.3-RELEASE?


-adrian



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-VmonUdHRJ0jcFphqXi1w2PwbDycLG190Yd5z8JQWGxW_1iQ>