PIM-malloc: A Fast and Scalable Dynamic Memory Allocator for Processing-In-Memory (PIM) Architectures
Dongjae Lee, Bongjoon Hyun, Youngjin Kwon, Minsoo Rhu
TL;DR
This work tackles the absence of dynamic memory allocation support in commodity PIM by conducting a design-space study of allocator metadata placement and management. It introduces PIM-malloc in two variants—software-only and hardware/software co-design—showing that software-only achieves $66\times$ faster allocations than a straw-man baseline, with an additional $31\%$ improvement from a per-PIM-core cache, and that the hardware-enhanced version further reduces backend latency on real workloads to reach $28\times$ throughput gains. The approach combines per-thread caches to service small allocations and a scaled-back buddy allocator for larger requests, and augments it with a hardware buddy cache and ISA extensions to accelerate metadata access. Evaluation on real UPMEM-PIM hardware and cycle-accurate simulation demonstrates strong performance, reduced DRAM transfers, and manageable hardware overhead, highlighting the feasibility of scalable dynamic allocators for processing-in-memory systems. Overall, PIM-malloc provides a practical pathway to use dynamic data structures and graph workloads on PIM, significantly advancing programmability and efficiency in PIM architectures.
Abstract
Dynamic memory allocation is essential in modern programming but remains under-supported in current PIM devices. In this work, we first conduct a design space exploration of PIM memory allocators, examining optimal metadata placement and management strategies. Building on these insights, we propose PIM-malloc, a fast and scalable allocator for real PIM hardware, improving allocation performance by $66\times$. We further enhance this design with a lightweight, per-PIM core hardware cache for dynamic allocation, achieving an additional $31\%$ performance gain. Finally, we demonstrate the effectiveness of PIM-malloc using a dynamic graph update workload, achieving a $28\times$ throughput increase.
