You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@arrow.apache.org by "Jeroen (Jira)" <ji...@apache.org> on 2022/01/27 21:41:00 UTC

[jira] [Commented] (ARROW-11475) [C++] Upgrade mimalloc

    [ https://issues.apache.org/jira/browse/ARROW-11475?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17483443#comment-17483443 ] 

Jeroen commented on ARROW-11475:
--------------------------------

FYI, we had to revert back to mimalloc 1.7.2 to build on MacOS 10.13 high-sierra, because 1.7.3 failed to build with xcode 10.1:

 
{code:java}
[ 60%] Building C object CMakeFiles/mimalloc-static.dir/src/alloc.c.o
/usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang -DMI_STATIC_LIB -I/tmp/apache-arrow-20220126-14221-1qo4vm7/apache-arrow-7.0.0/build/mimalloc_ep-prefix/src/mimalloc_ep/include -Qunused-arguments -O3 -DNDEBUG -DNDEBUG -fPIC   -Qunused-arguments -O3 -DNDEBUG -DNDEBUG -fPIC -fPIC -Wall -Wextra -Wno-unknown-pragmas -fvisibility=hidden -Wstrict-prototypes -Wpedantic -Wno-static-in-inline -ftls-model=local-dynamic -MD -MT CMakeFiles/mimalloc-static.dir/src/alloc.c.o -MF CMakeFiles/mimalloc-static.dir/src/alloc.c.o.d -o CMakeFiles/mimalloc-static.dir/src/alloc.c.o -c /tmp/apache-arrow-20220126-14221-1qo4vm7/apache-arrow-7.0.0/build/mimalloc_ep-prefix/src/mimalloc_ep/src/alloc.c
/tmp/apache-arrow-20220126-14221-1qo4vm7/apache-arrow-7.0.0/build/mimalloc_ep-prefix/src/mimalloc_ep/src/alloc.c:489:24: error: address argument to atomic operation must be a pointer to non-const _Atomic type ('const _Atomic(mi_threadid_t) *' invalid)
  if (mi_likely(tid == mi_atomic_load_relaxed(&segment->thread_id) && page->flags.full_aligned == 0)) {  // the thread id matches and it is not a full page, nor has aligned blocks
                       ^                      ~~~~~~~~~~~~~~~~~~~
/tmp/apache-arrow-20220126-14221-1qo4vm7/apache-arrow-7.0.0/build/mimalloc_ep-prefix/src/mimalloc_ep/include/mimalloc-atomic.h:47:50: note: expanded from macro 'mi_atomic_load_relaxed'
#define mi_atomic_load_relaxed(p)                mi_atomic(load_explicit)(p,mi_memory_order(relaxed))
                                                 ^                        ~
/tmp/apache-arrow-20220126-14221-1qo4vm7/apache-arrow-7.0.0/build/mimalloc_ep-prefix/src/mimalloc_ep/include/mimalloc-atomic.h:35:33: note: expanded from macro 'mi_atomic'
#define  mi_atomic(name)        atomic_##name
                                ^
<scratch space>:470:1: note: expanded from here
atomic_load_explicit
^
/Applications/Xcode-10.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.0/include/stdatomic.h:135:30: note: expanded from macro 'atomic_load_explicit'
#define atomic_load_explicit __c11_atomic_load
                             ^
/tmp/apache-arrow-20220126-14221-1qo4vm7/apache-arrow-7.0.0/build/mimalloc_ep-prefix/src/mimalloc_ep/include/mimalloc-internal.h:153:46: note: expanded from macro 'mi_likely'
#define mi_likely(x)       __builtin_expect((x),1)
                                             ^
1 error generated.
make[5]: *** [CMakeFiles/mimalloc-static.dir/src/alloc.c.o] Error 1
make[4]: *** [CMakeFiles/mimalloc-static.dir/all] Error 2
make[3]: *** [all] Error 2
make[2]: *** [mimalloc_ep-prefix/src/mimalloc_ep-stamp/mimalloc_ep-build] Error 2
make[1]: *** [CMakeFiles/mimalloc_ep.dir/all] Error 2
 {code}

> [C++] Upgrade mimalloc
> ----------------------
>
>                 Key: ARROW-11475
>                 URL: https://issues.apache.org/jira/browse/ARROW-11475
>             Project: Apache Arrow
>          Issue Type: New Feature
>          Components: C++
>            Reporter: Neal Richardson
>            Assignee: Antoine Pitrou
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 7.0.0
>
>          Time Spent: 8h 20m
>  Remaining Estimate: 0h
>
> I tried this in ARROW-11350 but ran into an issue (https://github.com/microsoft/mimalloc/issues/353). That has since been resolved and we could apply a patch to bring it in. Or we can wait for it to get into a proper release.
> There is also now a 1.7 release, which claims to work on the Apple M1, as well as a 2.0 version, which claims better performance. 



--
This message was sent by Atlassian Jira
(v8.20.1#820001)