Skip to content

Conversation

RaduBerinde
Copy link
Member

Add a simple function that returns the index of the P the goroutine is running on.
This will be used for efficient sharding of data structures.

Inspired from tailscale#109

Add a simple function that returns the index of the P the goroutine is
running on. This will be used for efficient sharding of data
structures.
Copy link

@jbowens jbowens left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@RaduBerinde RaduBerinde changed the title cockroach: runtime: add CurrentP cockroach-go1.23.12: runtime: add CurrentP Sep 25, 2025
@RaduBerinde
Copy link
Member Author

TFTR!

@RaduBerinde RaduBerinde merged commit 889a976 into cockroachdb:cockroach-go1.23.12 Sep 26, 2025
@RaduBerinde
Copy link
Member Author

@rickystewart - could we bump the patched go commit on master so I can start using this? Thanks!

@RaduBerinde RaduBerinde deleted the add-current-p branch September 26, 2025 05:25
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 29, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has a better implementation which can be used with the CRDB
Go runtime 9 (specifically cockroachdb/go#6);
this implementation is used with the `cockroach_go` build tag.
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 29, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has a better implementation which can be used with the CRDB
Go runtime 9 (specifically cockroachdb/go#6);
this implementation is used with the `cockroach_go` build tag.
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 29, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 29, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 29, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 30, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 30, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 30, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 30, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
RaduBerinde added a commit to RaduBerinde/crlib that referenced this pull request Sep 30, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
RaduBerinde added a commit to cockroachdb/crlib that referenced this pull request Sep 30, 2025
Add support for sharding with CPU locality and add sharded counters.
See counters_test.go for benchmark results.

Sharding has two implementations, one is be used with the CRDB Go
runtime (specifically cockroachdb/go#6) and
the `cockroach_go` build tag.

We also add a script that can be used to easily run tests against the
CRDB Go (along with a CI job).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants