Skip to content

patch: runtime: TailscaleCurrentP #109

Description

@bradfitz

For tailscale/tailscale#14412 for sharded counters that have high write load, we want a ~"current CPU" hint, even if it's outdated by the time we use it.

+func TailscaleCurrentP() int {
+       return int(getg().m.p.ptr().id)
+}

Commit 161c3b7

/cc @raggi

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions