Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: add tcache_none for mallocx #120

Merged
merged 2 commits into from
Nov 21, 2023

Conversation

my-vegetable-has-exploded
Copy link
Contributor

I have encountered the following problem when spawn multi thread with rdma.

 left: `18`,
 right: `17`', /home/wy/rust/async-rdma/src/mr_allocator.rs:443:21

it seem that memory allocated by jemalloc does not meet arena requirements(request memory from arena 18, but get memory in arena 17), then the checks of [lookup_raw_mr](https://github.com/datenlord/async-rdma/blob/033a056fd3304a601d386a56ab5f4b8808c8bd33/src/mr_allocator.rs#L432] don't pass.

So maybe we should add MALLOCX_TCACHE_NONE flag to disable tcache when using mallocx. (Maybe it is better to set opt.tcache to using mallctl?)

Besides, I add is_write for QueuePairOps, there is no need to acquire write lock of inner for send.

@GTwhy
Copy link
Collaborator

GTwhy commented Oct 8, 2023

Hi @my-vegetable-has-exploded , thanks for the fix.

I'm confused about the tcache flag. I disable it in .cargo/config.toml, and I think it was fixed #, but you have encountered a similar problem again.

LGTM.

@GTwhy GTwhy merged commit 9480131 into datenlord:master Nov 21, 2023
4 checks passed
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