Skip to contentSkip to conversation

Waste-Free Per-CPU Userspace Memory Allocation

LSF/MM/BPF TOPIC Mathieu Desnoyers 1 participant 2 messages Jan 28, 2025 – Apr 8, 2025 Memory management

lore
Share & tools
lore
#0 lore raw

Hi,

I submit this topic proposal for your consideration:

Introduce the librseq per-CPU user-space memory allocator. It implements concepts similar to the Linux kernel percpu allocator in userspace, and thus reduces waste of per-CPU data structures hot cache lines by eliminating padding usually required to eliminate false-sharing, and in addition tackles issues that arise from resident memory waste when restricting processes with scheduler affinity or cpusets.

It allows prototyping kernel algorithms within the safe limits of user-space.

I hope gathering feedback from MM experts about shortcomings of the proposed approach.

Thanks,

Mathieu

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com
#1 lore raw
Quoted 11 lines · Mathieu Desnoyers

Hi,

I submit this topic proposal for your consideration:

Introduce the librseq per-CPU user-space memory allocator. It implements concepts similar to the Linux kernel percpu allocator in userspace, and thus reduces waste of per-CPU data structures hot cache lines by eliminating padding usually required to eliminate false-sharing, and in addition tackles issues that arise from resident memory waste when restricting processes with scheduler affinity or cpusets.

Quoted 5 lines

It allows prototyping kernel algorithms within the safe limits of user-space.

I hope gathering feedback from MM experts about shortcomings of the proposed approach.

Here are the slides I presented during my talk:

https://drive.google.com/file/d/1DWOP6lfbqvYyJ1puwlADoUS9UNQ64SAw/view?usp=sharing

Signature · 3 lines
Mathieu Desnoyers
EfficiOS Inc.
https://www.efficios.com