-
Notifications
You must be signed in to change notification settings - Fork 88
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
blog: Add GSoC'24 blog on debugging mimalloc port #448
Conversation
@huyang531 I see this is marked as draft. Any reason for that? |
Not really. I just marked this as ready for review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @huyang531, see the inlines.
Also @razvanvirtan @RaduNichita please do a content check.
|
||
## Current Progress | ||
|
||
Following porting the multithreaded `cache-scratch` stress test in [the last blog post](https://unikraft.org/blog/2024-07-12-unikraft-gsoc-test-mimalloc-on-unikraft), this past three weeks I have been debugging the it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Following porting the multithreaded `cache-scratch` stress test in [the last blog post](https://unikraft.org/blog/2024-07-12-unikraft-gsoc-test-mimalloc-on-unikraft), this past three weeks I have been debugging the it. | |
Following porting the multithreaded `cache-scratch` stress test in [the last blog post](https://unikraft.org/blog/2024-07-12-unikraft-gsoc-test-mimalloc-on-unikraft), this past three weeks I have been debugging the it. |
This is unclear to me, can you rephrase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
### Debugging `pthread` | ||
|
||
The [first error we ran into](https://unikraft.org/blog/2024-07-12-unikraft-gsoc-test-mimalloc-on-unikraft#testing) was a memory corruption error with the `pthread` interface. | ||
After investigating the `pthread_join()` calls, I found that the threads were never even created correctly at all because `pthread_create()` uses the POSIX `mmap` system call, which never existed as we did not turn on virtual memory support (i.e., `ukvmem` alongside `posix-mmap`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think you should go that deep into technical details
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wrote the blog in sort of chronological order - it was because of thispthread
bug that I turned on virtual memory support, hence the rest. I have shortened the paragraph but still kept it here.
In order to resolve the abovementioned issues, I still have much to study about Unikraft's virtual memory management subsystem, its boot process, and how *mimalloc* works under the hood - and I will focus on just that in the following weeks. | ||
|
||
Hopefully, with those issues fixed, we could finally get the `cache-scratch` test running on multiple cores. | ||
Once that is done, I will get back on track with my "global" TODO list: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you mention what ideas do you have for benchmarking?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have written much about benchmarking (i.e., which benchmarks I would use, what they are for, etc.) in my last blog post so I didn't elaborate here. I will attach a link to my last blog post
Signed-off-by: Yang Hu <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed-by: Stefan Jumarea [email protected]
Approved-by: Stefan Jumarea [email protected]
Signed-off-by: Yang Hu [email protected]