Skip to content

Comments

mempool: switch from thread local storage to cpu local storage#53245

Closed
rzarzynski wants to merge 6 commits intoceph:mainfrom
rzarzynski:wip-mempool-cpulocalstorage
Closed

mempool: switch from thread local storage to cpu local storage#53245
rzarzynski wants to merge 6 commits intoceph:mainfrom
rzarzynski:wip-mempool-cpulocalstorage

Conversation

@rzarzynski
Copy link
Contributor

Contribution Guidelines

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands
  • jenkins retest this please
  • jenkins test classic perf
  • jenkins test crimson perf
  • jenkins test signed
  • jenkins test make check
  • jenkins test make check arm64
  • jenkins test submodules
  • jenkins test dashboard
  • jenkins test dashboard cephadm
  • jenkins test api
  • jenkins test docs
  • jenkins render docs
  • jenkins test ceph-volume all
  • jenkins test ceph-volume tox
  • jenkins test windows

When the cpu local storage is used aligning the coutner's struct
hurts cache density while any benefit may be observed only when
there is an unlikely collision (more CPUs than shards).

Signed-off-by: Radosław Zarzyński <[email protected]>
The only situation I can imagine when they needed is so large
number of CPUs that we're running out of shards.

If that's a worry, we either can:
 - tune to use do atomic or unatomic counting on the the fly,
 - ceph_assert it never happens.

Signed-off-by: Radosław Zarzyński <[email protected]>
This reverts commit 3c1bc73.

At the moment we have:
```
pool x: padded shard cpu 1 | padded shard cpu 2 | ...
pool y: padded shard cpu 1 | padded shard cpu 2 | ...
```

We could have:

```
padded shards of cpu 1: pool x | pool y | ...
padded shards of cpu 2: pool x | pool y | ...
```

The change – as it rearranges data structures – would be far bigger
than the small-but-wrong commit being reverted :-(.

Signed-off-by: Radosław Zarzyński <[email protected]>
It looks this counter was initially thought to be a debug one
but -- because of the `force_register` --  flag it is widely
used now.

Found by Yingxin Cheng <[email protected]>

Signed-off-by: Radosław Zarzyński <[email protected]>

Conflicts:
	src/include/mempool.h
@github-actions
Copy link

This pull request can no longer be automatically merged: a rebase is needed and changes have to be manually resolved

@github-actions
Copy link

github-actions bot commented Feb 9, 2024

This pull request has been automatically marked as stale because it has not had any activity for 60 days. It will be closed if no further activity occurs for another 30 days.
If you are a maintainer or core committer, please follow-up on this pull request to identify what steps should be taken by the author to move this proposed change forward.
If you are the author of this pull request, thank you for your proposed contribution. If you believe this change is still appropriate, please ensure that any feedback has been addressed and ask for a code review.

@github-actions github-actions bot added the stale label Feb 9, 2024
@github-actions
Copy link

This pull request has been automatically closed because there has been no activity for 90 days. Please feel free to reopen this pull request (or open a new one) if the proposed change is still appropriate. Thank you for your contribution!

@github-actions github-actions bot closed this Mar 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant