]> Cypherpunks repositories - gostls13.git/commit
runtime: add per-p page allocation cache
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 16 Sep 2019 21:23:24 +0000 (21:23 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 Nov 2019 18:00:54 +0000 (18:00 +0000)
commita2cd2bd55d1e932b52f0b7dea45a85e058fc77d5
tree1d58c63c070f9e46bc68dd8c33d11cac61035a86
parent81640ea38dc6577bdf1b206b778b968d341c27eb
runtime: add per-p page allocation cache

This change adds a per-p free page cache which the page allocator may
allocate out of without a lock. The change also introduces a completely
lockless page allocator fast path.

Although the cache contains at most 64 pages (and usually less), the
vast majority (85%+) of page allocations are exactly 1 page in size.

Updates #35112.

Change-Id: I170bf0a9375873e7e3230845eb1df7e5cf741b78
Reviewed-on: https://go-review.googlesource.com/c/go/+/195701
Run-TryBot: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/export_test.go
src/runtime/malloc_test.go
src/runtime/mheap.go
src/runtime/proc.go
src/runtime/runtime2.go