-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
server: reimplement growStack hack in assembly #37967
Conversation
The go1.12 compiler breaks the Go version of the growStack hack (it optimizes the 16kb stack variable out of existence). Reimplement growStack in assembly which will be same from the machinations of the Go compiler. Release note (performance improvement): Fix a significant performance regression when building CockroachDB with go1.12.
See #37966 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Nice find. Any idea what change in the Go compiler caused the old hack to be optimized away?
The symptoms you saw in #37966 (comment) look awfully similar to what @jeffrey-xiao and I are seeing in #37706. It's possible that we're seeing a very similar issue where the difference in proto padding is causing stack growth underneath the HLC clock mutex (instead of somewhere else) and destroying performance. Once this is merged, we should dig into whether we can have any effect on the perf drop by playing around with this new Grow
function. Go 1.12 should also help us determine whether we can attribute slowdown of the clock to stack growth.
bors r=nvanbenschoten |
37967: server: reimplement growStack hack in assembly r=nvanbenschoten a=petermattis The go1.12 compiler breaks the Go version of the growStack hack (it optimizes the 16kb stack variable out of existence). Reimplement growStack in assembly which will be same from the machinations of the Go compiler. Release note (performance improvement): Fix a significant performance regression when building CockroachDB with go1.12. Co-authored-by: Peter Mattis <[email protected]>
Build succeeded |
No GNU_STACK magic? Did my test not run or does this somehow avoid setting the exec-stack flag? |
The assembly file is not empty, so the GNU_STACK magic isn’t necessary,
right? Or did I misunderstand that magic.
…On Mon, Jun 3, 2019 at 5:05 PM Ben Darnell ***@***.***> wrote:
No GNU_STACK magic? Did my test not run or does this somehow avoid setting
the exec-stack flag?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#37967?email_source=notifications&email_token=ABPJ756KS2S4YMNBLHHFLCLPYWBSHA5CNFSM4HSBGXK2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODW2WDNA#issuecomment-498426292>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABPJ756J3GKGQ6GD36EMDWTPYWBSHANCNFSM4HSBGXKQ>
.
|
I don't think being empty matters. Or at least it's not sufficient; the empty file in the sql/exec package doesn't trigger it. There's something we don't understand going on here (my best guess is that it has something to do with whether or not cgo is in use in the package). |
@bdarnell I ran |
The go1.12 compiler breaks the Go version of the growStack hack (it
optimizes the 16kb stack variable out of existence). Reimplement
growStack in assembly which will be same from the machinations of the Go
compiler.
Release note (performance improvement): Fix a significant performance
regression when building CockroachDB with go1.12.