Re: [PATCH v6 00/47] maps/threads/dsos memory improvements and fixes

From: Arnaldo Carvalho de Melo
Date: Mon Dec 18 2023 - 15:53:48 EST


Em Wed, Dec 06, 2023 at 05:16:34PM -0800, Ian Rogers escreveu:
> Modify the implementation of maps to not use an rbtree as the
> container for maps, instead use a sorted array. Improve locking and
> reference counting issues.
>
> Similar to maps separate out and reimplement threads to use a hashmap
> for lower memory consumption and faster look up. The fixes a
> regression in memory usage where reference count checking switched to
> using non-invasive tree nodes. Reduce its default size by 32 times
> and improve locking discipline. Also, fix regressions where tids had
> become unordered to make `perf report --tasks` and
> `perf trace --summary` output easier to read.
>
> Better encapsulate the dsos abstraction. Remove the linked list and
> rbtree used for faster iteration and log(n) lookup to a sorted array
> for similar performance but half the memory usage per dso. Improve
> reference counting and locking discipline, adding reference count
> checking to dso.
>
> v6:
> - Patch 1 is a parameter name fix requested by Namhyung.
> - Patches 2 to 13 split apart a macro to function callback refactor
> requested by Arnaldo.
> - Add fixes and acked-by to later patches from Namhyung.

Applied 1-10, 11 is failing, I'll try to resolve if you don't do it
first.

This should be in tmp.perf-tools-next soon

- Arnaldo