]> Cypherpunks repositories - gostls13.git/commit
runtime: fix usleep on linux/PPC64
authorPaul E. Murphy <murp@ibm.com>
Thu, 20 Oct 2022 22:01:01 +0000 (17:01 -0500)
committerPaul Murphy <murp@ibm.com>
Mon, 24 Oct 2022 16:31:36 +0000 (16:31 +0000)
commit65f863529ce2d66a63d8be0f62b128feb736a575
tree82f8b1b8b11f1d39b4246fbd72e5e5f660ca79a4
parentdecdad3537dd4797fde8c7db3005da674b50015c
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 #56374

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