]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] 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:45 +0000 (18:43 +0000)
commite54e808d781745e12b0f7ce471934735750e7015
treefeb1efe1ca71394f12daa8033a07dbe60fd49402
parentdb5cb5fceed48a487ca15c8321ddcb19652cc1b9
[release-branch.go1.18] 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 #56396

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/+/445156
src/runtime/sys_linux_ppc64x.s