[v3,0/5] malloc: TCACHE improvement for free and calloc

Message ID 20240829062732.1663342-1-wangyang.guo@intel.com
Headers
Series malloc: TCACHE improvement for free and calloc |

Message

Guo, Wangyang Aug. 29, 2024, 6:27 a.m. UTC
  This series aims to improve TCACHE performance in memory allocator:
simplify TCACHE code path in free() and add TCACHE support for calloc().

---
Changes in v3:
- Add comments to the split functions.
- Wrap out seldom executed tcache_double_free_verify() as noinline
  function.
- Split out tcache_available() as helper function.
- Link to v2: https://sourceware.org/pipermail/libc-alpha/2024-August/159425.html
Changes in v2:
- _int_free_check() should be put outside of USE_TCACHE.
- Merge tst-safe-linking fix into commit#5 to make sure CI check pass.
- Link to v1: https://sourceware.org/pipermail/libc-alpha/2024-August/159357.html

Wangyang Guo (5):
  malloc: Split _int_free() into 3 sub functions
  malloc: Avoid func call for tcache quick path in free()
  malloc: Arena is not needed for tcache path in free()
  benchtests: Add calloc function test to bench-malloc-thread
  malloc: Add tcache path for calloc

 benchtests/bench-malloc-thread.c | 114 ++++++++-----
 malloc/malloc.c                  | 280 ++++++++++++++++++++-----------
 malloc/tst-safe-linking.c        |  81 +++++++--
 3 files changed, 327 insertions(+), 148 deletions(-)
  

Comments

Guo, Wangyang Sept. 10, 2024, 1:01 a.m. UTC | #1
On 8/29/2024 2:27 PM, Wangyang Guo wrote:
> This series aims to improve TCACHE performance in memory allocator:
> simplify TCACHE code path in free() and add TCACHE support for calloc().
> 
> ---
> Changes in v3:
> - Add comments to the split functions.
> - Wrap out seldom executed tcache_double_free_verify() as noinline
>    function.
> - Split out tcache_available() as helper function.
> - Link to v2: https://sourceware.org/pipermail/libc-alpha/2024-August/159425.html
> Changes in v2:
> - _int_free_check() should be put outside of USE_TCACHE.
> - Merge tst-safe-linking fix into commit#5 to make sure CI check pass.
> - Link to v1: https://sourceware.org/pipermail/libc-alpha/2024-August/159357.html
> 
> Wangyang Guo (5):
>    malloc: Split _int_free() into 3 sub functions
>    malloc: Avoid func call for tcache quick path in free()
>    malloc: Arena is not needed for tcache path in free()
>    benchtests: Add calloc function test to bench-malloc-thread
>    malloc: Add tcache path for calloc
> 
>   benchtests/bench-malloc-thread.c | 114 ++++++++-----
>   malloc/malloc.c                  | 280 ++++++++++++++++++++-----------
>   malloc/tst-safe-linking.c        |  81 +++++++--
>   3 files changed, 327 insertions(+), 148 deletions(-)
> 

Ping.

BR
Wangyang
  
Guo, Wangyang Sept. 23, 2024, 1:56 a.m. UTC | #2
On 9/10/2024 9:01 AM, Guo, Wangyang wrote:
> On 8/29/2024 2:27 PM, Wangyang Guo wrote:
>> This series aims to improve TCACHE performance in memory allocator:
>> simplify TCACHE code path in free() and add TCACHE support for calloc().
>>
>> ---
>> Changes in v3:
>> - Add comments to the split functions.
>> - Wrap out seldom executed tcache_double_free_verify() as noinline
>>    function.
>> - Split out tcache_available() as helper function.
>> - Link to v2: 
>> https://sourceware.org/pipermail/libc-alpha/2024-August/159425.html
>> Changes in v2:
>> - _int_free_check() should be put outside of USE_TCACHE.
>> - Merge tst-safe-linking fix into commit#5 to make sure CI check pass.
>> - Link to v1: 
>> https://sourceware.org/pipermail/libc-alpha/2024-August/159357.html
>>
>> Wangyang Guo (5):
>>    malloc: Split _int_free() into 3 sub functions
>>    malloc: Avoid func call for tcache quick path in free()
>>    malloc: Arena is not needed for tcache path in free()
>>    benchtests: Add calloc function test to bench-malloc-thread
>>    malloc: Add tcache path for calloc
>>
>>   benchtests/bench-malloc-thread.c | 114 ++++++++-----
>>   malloc/malloc.c                  | 280 ++++++++++++++++++++-----------
>>   malloc/tst-safe-linking.c        |  81 +++++++--
>>   3 files changed, 327 insertions(+), 148 deletions(-)
>>
> 
> Ping.

Ping.

BR
Wangyang