| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
[libc] Cache old slabs when allocating GPU memory (#151866) Summary: This patch introduces a lock-free stack used to store a fixed number of slabs. Instead of going directly through RPC memory, we instead can consult the cache and use that. Currently, this means that ~64 MiB of memory will remain in-use if the user completely fills the cache. However, because we always fully destroy the object, the chunk size can be reset so they can be fully reused. This greatly improves performance in cases where the user has previously accessed malloc, lowering the difference between an implementation that does not free slabs at all and one that does. We can also skip the expensive zeroing step if the old chunk size was smaller than the previous one. Smaller chunk sizes need a larger bitfield, and because we know for a fact that the number of users remaining in this slab is zero thanks to the reference counting we can guarantee that the bitfield is all zero like when it was initialized. | 1 年前 | |
[libc] ensure tls dtors are called in main thread (#133641) This is a part of allocator patch since I want to make sure the TLS for allocators are correctly handled. TLS dtors are not invoked on exit previously. This departures from major libc implementations. This PR fixes the issue by aligning the behavior with bionic. https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/bionic/exit.cpp I believe the finalization order is also consistent with glibc now: On main thread exiting: - pthread_key dtors are not called (unless exiting with pthread_exit) - __cxa based tls dtors are called - ::__cxa_atexit and ::atexit dtors are called - .fini dtors are called  | 1 年前 | |
[libc] Add utility functions for warp-level scan and reduction (#84866) Summary: The GPU uses a SIMT execution model. That means that each value actually belongs to a group of 32 or 64 other lanes executing next to it. These platforms offer some intrinsic fuctions to actually take elements from neighboring lanes. With these we can do parallel scans or reductions. These functions do not have an immediate user, but will be used in the allocator interface that is in-progress and are generally good to have. This patch is a precommit for these new utilitly functions. | 2 年前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 1 年前 | ||
| 1 年前 | ||
| 2 年前 |