Mattias Jansson

Results 58 comments of Mattias Jansson

I don't understand the output of that sanitizer, it says `Write of size 4 at 0x000000fec030 by main thread: #0 benchmark_run /code/jmmb/mimalloc-bench/bench/rptest/rptest.c:777:19 (rptest+0x4b51b4)` but looking at `rptest.c` in this repo...

I assume it's referring to the sleep on line 772, not 775? In any case, that's just a poor man's semaphore to get the threads running at roughly the same...

Is this on x64 or aarch64 by the way?

Sorry, I can't really make any sense of the sanitizer output ``` WARNING: ThreadSanitizer: data race (pid=17173) Atomic write of size 8 at 0xfffff5503ee0 by thread T2: #0 __tsan_atomic64_compare_exchange_val (rptest+0x4790d4)...

So sure, thread T1 benchmark_worker can read the pointer before thread T2 benchmark_worker writes it, but that's fine since it's initialized to 0 by the main thread before any of...

you can try just getting rid of the thread sleep and see what the thread sanitiser says then, it's mostly there to make sure threads launch execution at the same...

Unfortunately Visual Studio still doesn't support C11 atomics, but I'll change upstream the benchmark start flag to an atomic and use on non-MSVC compilers

The upstream benchmark repo has been updated to use stdatomic on gcc/clang and an atomic for the start variable - https://github.com/mjansson/rpmalloc-benchmark/commit/65f9ae0475ba02fcf29e0525d8a3930b084a24e0

I guess this can be closed now?

Which changes would that be? I was looking at the history @ https://github.com/daanx/mimalloc-bench/commits/master/bench/rptest but didn't see anything significant