mirror of
https://github.com/torvalds/linux.git
synced 2026-10-26 20:46:02 +01:00
Add gpu_test_buddy_dirty_tracker_performance to demonstrate the key
advantage of the decoupled dirty-tracker design over the old dual-tree
/ force_merge approach.
The test runs two scenarios on a 4 GiB pool after alternating
clear/dirty fragmentation at 4 KiB granularity:
1. Contiguous 2 GiB alloc: smaller than the 4 GiB span so it routes
through the contiguous allocator rather than the exact-range fast
path. The old design requires __force_merge() to rebuild the
block; the new design coalesces during free() so the alloc is
O(log N).
old (force_merge) - 45 ms
dirty tracker design - 11 ms
2. Repeated 256 KiB alloc throughput: the old design pays
__force_merge() on every alloc; the new design does not.
old (force_merge) - 86 ms
dirty tracker design - 20 ms
v2:
- Force a contiguous 256 KiB allocation in the repeated-alloc loop so
the baseline actually exercises __force_merge(). (sashiko)
v3:
- Make the first test allocate 2 GiB instead of the full 4 GiB pool,
so it really uses the contiguous path; update the numbers. (sashiko)
Assisted-by: Claude:claude-opus-4-8
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Christian König <christian.koenig@amd.com>
Signed-off-by: Arunpravin Paneer Selvam <Arunpravin.PaneerSelvam@amd.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patch.msgid.link/20260825172432.80355-2-Arunpravin.PaneerSelvam@amd.com
|
||
|---|---|---|
| .. | ||
| .kunitconfig | ||
| gpu_buddy_test.c | ||
| gpu_random.c | ||
| gpu_random.h | ||
| Makefile | ||