<feed xmlns='http://www.w3.org/2005/Atom'>
<title>go/src/runtime/sys_linux_s390x.s, branch fix-runtime-test-GOMAXPROCS</title>
<subtitle>Fork of Go programming language with my patches.</subtitle>
<id>http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS</id>
<link rel='self' href='http://git.kilabit.info/go/atom?h=fix-runtime-test-GOMAXPROCS'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/'/>
<updated>2025-07-04T01:43:56Z</updated>
<entry>
<title>runtime: correct vdsoSP on S390X</title>
<updated>2025-07-04T01:43:56Z</updated>
<author>
<name>Cherry Mui</name>
<email>cherryyz@google.com</email>
</author>
<published>2025-07-03T03:26:44Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=6c3b5a2798c83d583cb37dba9f39c47300d19f1f'/>
<id>urn:sha1:6c3b5a2798c83d583cb37dba9f39c47300d19f1f</id>
<content type='text'>
It should get the caller's SP. The current code gets the address
of the first parameter, which is one word above the caller's SP.
There is a slot for saving the LR at 0(SP) in the caller's frame.

Fixes #62086 (for s390x).

Change-Id: Ie8cbfabc8161b98658c884a32e0af72df189ea56
Reviewed-on: https://go-review.googlesource.com/c/go/+/685715
Reviewed-by: David Chase &lt;drchase@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
</content>
</entry>
<entry>
<title>runtime: fix usleep on s390x/linux</title>
<updated>2025-02-13T19:05:31Z</updated>
<author>
<name>Paul Murphy</name>
<email>murp@ibm.com</email>
</author>
<published>2025-02-12T14:45:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=ca4649747a0057ea59c34c4126ab3eed6086dd88'/>
<id>urn:sha1:ca4649747a0057ea59c34c4126ab3eed6086dd88</id>
<content type='text'>
The timespec argument takes the remainder in nanoseconds, not
microseconds. Convert the remaining time to nsec.

Fixes #71714

Change-Id: I36cbbe3a088830c5e3afcc9516ef42e96ee21268
Reviewed-on: https://go-review.googlesource.com/c/go/+/648915
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Mauri de Souza Meneguzzo &lt;mauri870@gmail.com&gt;
Reviewed-by: Axel Busch &lt;axel.busch@ibm.com&gt;
Run-TryBot: Paul Murphy &lt;murp@ibm.com&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Reviewed-by: Ian Lance Taylor &lt;iant@google.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: Vishwanatha HD &lt;vishwanatha.hd@ibm.com&gt;
</content>
</entry>
<entry>
<title>runtime: use vDSO for getrandom() on linux</title>
<updated>2024-09-28T01:07:09Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2024-09-22T01:45:29Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=eb6f2c24cd17c0ca1df7e343f8d9187eef7d6e13'/>
<id>urn:sha1:eb6f2c24cd17c0ca1df7e343f8d9187eef7d6e13</id>
<content type='text'>
Linux 6.11 supports calling getrandom() from the vDSO. It operates on a
thread-local opaque state allocated with mmap using flags specified by
the vDSO.

Opaque states are allocated in chunks, ideally ncpu at a time as a hint,
rounding up to as many fit in a complete page. On first use, a state is
assigned to an m, which owns that state, until the m exits, at which
point it is given back to the pool.

Performance appears to be quite good:

           │    sec/op    │   sec/op       vs base                 │
Read/4-16    222.45n ± 3%   27.13n   ± 6%  -87.80% (p=0.000 n=10)
           │     B/s      │      B/s       vs base                 │
Read/4-16    17.15Mi ± 3%   140.61Mi ± 6%  +719.82% (p=0.000 n=10)

Fixes #69577.

Change-Id: Ib6f44e8f2f3940c94d970eaada0eb566ec297dc7
Reviewed-on: https://go-review.googlesource.com/c/go/+/614835
Reviewed-by: Filippo Valsorda &lt;filippo@golang.org&gt;
Reviewed-by: Cuong Manh Le &lt;cuong.manhle.vn@gmail.com&gt;
Auto-Submit: Jason Donenfeld &lt;Jason@zx2c4.com&gt;
Reviewed-by: Paul Murphy &lt;murp@ibm.com&gt;
LUCI-TryBot-Result: Go LUCI &lt;golang-scoped@luci-project-accounts.iam.gserviceaccount.com&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: add "sigaction" to sigreturn symbol name</title>
<updated>2023-03-24T18:53:44Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2023-03-23T19:28:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=0ed364a46379f9561b72a29e7fdad15a1e191325'/>
<id>urn:sha1:0ed364a46379f9561b72a29e7fdad15a1e191325</id>
<content type='text'>
In order to identify the sigreturn function, gdb looks for
"__restore_rt". However because that symbol is sometimes missing from
the symbol table, it also performs the same instruction matching as
libgcc, but only in symbols containing "sigaction" (it expects sigaction
to preceed __restore_rt).

To match this heuristic, we add __sigaction to the sigreturn symbol
name.

Fixes #25218.

Change-Id: I09cb231ad23f668d451f31dd5633f782355fc91d
Reviewed-on: https://go-review.googlesource.com/c/go/+/479096
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: always keep global reference to mp until mexit completes</title>
<updated>2022-10-18T20:57:24Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2022-10-18T16:01:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=e252dcf9d38ce9192bccacb7e33867cbfbd22b6c'/>
<id>urn:sha1:e252dcf9d38ce9192bccacb7e33867cbfbd22b6c</id>
<content type='text'>
Ms are allocated via standard heap allocation (`new(m)`), which means we
must keep them alive (i.e., reachable by the GC) until we are completely
done using them.

Ms are primarily reachable through runtime.allm. However, runtime.mexit
drops the M from allm fairly early, long before it is done using the M
structure. If that was the last reference to the M, it is now at risk of
being freed by the GC and used for some other allocation, leading to
memory corruption.

Ms with a Go-allocated stack coincidentally already keep a reference to
the M in sched.freem, so that the stack can be freed lazily. This
reference has the side effect of keeping this Ms reachable. However, Ms
with an OS stack skip this and are at risk of corruption.

Fix this lifetime by extending sched.freem use to all Ms, with the value
of mp.freeWait determining whether the stack needs to be freed or not.

Fixes #56243.

Change-Id: Ic0c01684775f5646970df507111c9abaac0ba52e
Reviewed-on: https://go-review.googlesource.com/c/go/+/443716
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: move epoll syscalls to runtime/internal/syscall</title>
<updated>2022-10-07T18:28:11Z</updated>
<author>
<name>Andrew Pogrebnoy</name>
<email>absourd.noise@gmail.com</email>
</author>
<published>2022-10-07T07:12:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=c7cc2b94c63af610a29b1b48cfbfb87cb8abf05b'/>
<id>urn:sha1:c7cc2b94c63af610a29b1b48cfbfb87cb8abf05b</id>
<content type='text'>
This change moves Linux epoll's syscalls implementation to the
"runtime/internal/syscall" package. The intention in this CL was to
minimise behavioural changes but make the code more generalised. This
also will allow adding new syscalls (like epoll_pwait2) without the
need to implement assembly stubs for each arch.

It also drops epoll_create as not all architectures provide this call.
epoll_create1 was added to the kernel in version 2.6.27 and Go requires
Linux kernel version 2.6.32 or later since Go 1.18. So it is safe to
always use epoll_create1.

This is a resubmit as the previous CL 421994 was reverted due to test
failures after the merge with the master. The issue was fixed in
CL 438615

For #53824
For #51087

Change-Id: I1bd0f23a85b4f9b80178c5dd36fd3e95ff4f9648
Reviewed-on: https://go-review.googlesource.com/c/go/+/440115
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>Revert "runtime: move epoll syscalls to runtime/internal/syscall"</title>
<updated>2022-09-30T19:07:13Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2022-09-30T18:43:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4a49af5755564b5412acea2cfc3ac8556a7af453'/>
<id>urn:sha1:4a49af5755564b5412acea2cfc3ac8556a7af453</id>
<content type='text'>
This reverts CL 421994.

Reason for revert: breaks runtime.TestCheckPtr2

For #53824
For #51087

Change-Id: I044ea4d6efdffe0a4b7fb0d2bb3717d9f391fc59
Reviewed-on: https://go-review.googlesource.com/c/go/+/437295
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
Reviewed-by: Bryan Mills &lt;bcmills@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: move epoll syscalls to runtime/internal/syscall</title>
<updated>2022-09-30T17:35:24Z</updated>
<author>
<name>Andrew Pogrebnoy</name>
<email>absourd.noise@gmail.com</email>
</author>
<published>2022-08-01T14:58:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4e6f963469d8f489586b2bf277af30e0fbfa1679'/>
<id>urn:sha1:4e6f963469d8f489586b2bf277af30e0fbfa1679</id>
<content type='text'>
This change moves Linux epoll's syscalls implementation to the
"runtime/internal/syscall" package. The intention in this CL was to
minimise behavioural changes but make the code more generalised. This
also will allow adding new syscalls (like epoll_pwait2) without the
need to implement assembly stubs for each arch.

It also drops epoll_create as not all architectures provide this call.
epoll_create1 was added to the kernel in version 2.6.27 and Go requires
Linux kernel version 2.6.32 or later since Go 1.18. So it is safe to
always use epoll_create1.

For #53824
For #51087

Change-Id: I9a6a26b7f2075a38e041de1bab4691da0ecb94fc
Reviewed-on: https://go-review.googlesource.com/c/go/+/421994
Reviewed-by: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Dmitri Shuralyov &lt;dmitshur@google.com&gt;
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
</content>
</entry>
<entry>
<title>runtime: enable vDSO support for s390x architecture</title>
<updated>2022-05-11T13:30:43Z</updated>
<author>
<name>Axel Busch</name>
<email>94176305+abuschIBM@users.noreply.github.com</email>
</author>
<published>2022-05-10T13:48:19Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=636c5f02082e4be5ef2d9a66c99c9e31b72246a3'/>
<id>urn:sha1:636c5f02082e4be5ef2d9a66c99c9e31b72246a3</id>
<content type='text'>
This change adds support for vDSO for s390x architecture. This avoids the use of system calls in nanotime and walltime and accelerates them by factor 4-5.

Benchmarks:
100,000,000 x time.Now():
syscall fallback	13923ms		139.23 ns/op
vDSO enabled		2640ms	 	26.40 ns/op

Change-Id: Ic679fe31048379e59ccf83b400140f13c9d49696
GitHub-Last-Rev: 8f6e918a45cf8c5aadc5c203949a8ce4e372086f
GitHub-Pull-Request: golang/go#49717
Reviewed-on: https://go-review.googlesource.com/c/go/+/365995
Run-TryBot: Paul Murphy &lt;murp@ibm.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: David Chase &lt;drchase@google.com&gt;
Reviewed-by: Paul Murphy &lt;murp@ibm.com&gt;
Reviewed-by: Michael Knyszek &lt;mknyszek@google.com&gt;
Reviewed-by: Jonathan Albrecht &lt;jonathan.albrecht@ibm.com&gt;
Reviewed-by: Heschi Kreinick &lt;heschi@google.com&gt;
Reviewed-by: Bill O'Farrell &lt;billotosyr@gmail.com&gt;
</content>
</entry>
<entry>
<title>runtime: mark sigtramp as TOPFRAME</title>
<updated>2022-04-28T16:29:07Z</updated>
<author>
<name>Michael Pratt</name>
<email>mpratt@google.com</email>
</author>
<published>2022-04-26T18:42:34Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/go/commit/?id=4bb45f7549548add8222aa4f3040d0e2120691a9'/>
<id>urn:sha1:4bb45f7549548add8222aa4f3040d0e2120691a9</id>
<content type='text'>
Currently throw() in the signal handler results in "fatal error: unknown
return pc from runtime.sigreturn ...".

Marking sigtramp as TOPFRAME allows gentraceback to stop tracebacks at
the end of a signal handler, since there is not much beyond sigtramp.

This is just done on Linux for now, but may apply to other Unix systems
as well.

Change-Id: I96edcb945283f417a5bfe00ce2fb2b1a0d578692
Reviewed-on: https://go-review.googlesource.com/c/go/+/402190
Reviewed-by: Austin Clements &lt;austin@google.com&gt;
Run-TryBot: Michael Pratt &lt;mpratt@google.com&gt;
Auto-Submit: Michael Pratt &lt;mpratt@google.com&gt;
TryBot-Result: Gopher Robot &lt;gobot@golang.org&gt;
Reviewed-by: Cherry Mui &lt;cherryyz@google.com&gt;
</content>
</entry>
</feed>
