]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.19] runtime: fix usleep on linux/PPC64
authorPaul E. Murphy <murp@ibm.com>
Thu, 20 Oct 2022 22:01:01 +0000 (17:01 -0500)
committerMichael Knyszek <mknyszek@google.com>
Tue, 8 Nov 2022 18:43:38 +0000 (18:43 +0000)
commit23fd10b3780e44da5fa019a7bd712729e6acfef7
tree6ba84947ebf450cce22bfd65ce4815c7089877c4
parent6109c07ec4cf2b26eba9441ad5148f8dcb8c6497
[release-branch.go1.19] runtime: fix usleep on linux/PPC64

The existing implementation fails to convert the remainder
microseconds to nanoseconds. This causes sysmon to consume
much more cpu, and generate lots of context switches.

We can also do a little better here to avoid division by a
constant. I used go to determine the magic numbers.

Fixes #56397

Change-Id: I2e37ec218b9027efab6db4634eed1504c0c1b3c8
Reviewed-on: https://go-review.googlesource.com/c/go/+/444735
Reviewed-by: Lynn Boger <laboger@linux.vnet.ibm.com>
Run-TryBot: Paul Murphy <murp@ibm.com>
Reviewed-by: David Chase <drchase@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/445157
src/runtime/sys_linux_ppc64x.s