diff options
| author | Mark Brown <broonie@kernel.org> | 2026-07-03 15:44:41 +0100 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-07-03 15:44:41 +0100 |
| commit | 5a42c9f18870162ae14f0d8e193671017421a982 (patch) | |
| tree | 5c84a4cc4c90157c7e9c833c037d4e825f21f1bb /include/linux/gpu_buddy.h | |
| parent | cd4f513931c31ca3ed852f370bb573fcbd0721c5 (diff) | |
| parent | 903f8773ee96c5dc5fb9aec65227f39fd3e7a1dc (diff) | |
| download | linux-next-5a42c9f18870162ae14f0d8e193671017421a982.tar.gz linux-next-5a42c9f18870162ae14f0d8e193671017421a982.zip | |
Merge branch 'for-linux-next' of https://gitlab.freedesktop.org/drm/misc/kernel.git
Diffstat (limited to 'include/linux/gpu_buddy.h')
| -rw-r--r-- | include/linux/gpu_buddy.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/gpu_buddy.h b/include/linux/gpu_buddy.h index 71941a039648..e037714563d8 100644 --- a/include/linux/gpu_buddy.h +++ b/include/linux/gpu_buddy.h @@ -173,6 +173,21 @@ struct gpu_buddy { * that fits in the remaining space. */ struct gpu_buddy_block **roots; + /* + * Per-order free block scoreboard: free_scoreboard[order] holds the + * number of blocks of that order currently in the free state. + * Incremented in mark_free(), decremented wherever rbtree_remove() is + * called on a free block. + */ + u64 *free_scoreboard; + /* + * Per-order used block scoreboard: used_scoreboard[order] holds the + * number of blocks of that order currently in the allocated state. + * Incremented in mark_allocated(), decremented in mark_free() (guarded + * by gpu_buddy_block_is_allocated()) and in __gpu_buddy_free() when an + * allocated block is consumed directly during buddy coalescing. + */ + u64 *used_scoreboard; /* public: */ unsigned int n_roots; unsigned int max_order; |
