https://bugs.llvm.org/show_bug.cgi?id=46739

            Bug ID: 46739
           Summary: Multi thread allocation performance issues
           Product: compiler-rt
           Version: 11.0
          Hardware: Other
                OS: other
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: scudo
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]

We try to apply scudo to android R os on Galaxy S20.
But scudo has allocation performance issue when we test Geekbench 5.1.1
multi-core cases.
Some cases got lower point than Jemalloc that we used previous android version.

                Scudo     Jemalloc
HTML5            1450       2886
Face Detection   3274       3749
(Higher is better)

These tests seems allocate a lot of large size of memory with 8 threads.
There are lock contention happened between threads when threads try to allocate
on secondary cache.

lockSlow, especially, is bottle-neck on these cases.
If we change HybridMutex::lock to use only "yield and trylock" as below, HTML5
score improve to 2161.

class HybridMutex {
public:
.............
  NOINLINE void lock() {
    if (LIKELY(tryLock()))
      return;
#ifdef __clang__
#pragma nounroll
#endif
    while (true) {
      yieldProcessor(NumberOfYields);
      if (tryLock())
        return;
    }
  }


We consider test result show lockSlow wake threads up is too slow.
This is not whole reason of multi-core test result, HybridMutex::lock has
performance problem to using android R os.

Could you invest these multi-thread allocation performance issue?

Thank you.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to