summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/bitmap_allocator_priv.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/bitmap_allocator_priv.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/bitmap_allocator_priv.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/bitmap_allocator_priv.h b/drivers/gpu/nvgpu/gk20a/bitmap_allocator_priv.h
index 053a6425..a686b704 100644
--- a/drivers/gpu/nvgpu/gk20a/bitmap_allocator_priv.h
+++ b/drivers/gpu/nvgpu/gk20a/bitmap_allocator_priv.h
@@ -31,6 +31,15 @@ struct gk20a_bitmap_allocator {
31 u64 num_bits; /* Number of allocatable bits. */ 31 u64 num_bits; /* Number of allocatable bits. */
32 u64 bit_offs; /* Offset of bitmap. */ 32 u64 bit_offs; /* Offset of bitmap. */
33 33
34 /*
35 * Optimization for making repeated allocations faster. Keep track of
36 * the next bit after the most recent allocation. This is where the next
37 * search will start from. This should make allocation faster in cases
38 * where lots of allocations get made one after another. It shouldn't
39 * have a negative impact on the case where the allocator is fragmented.
40 */
41 u64 next_blk;
42
34 unsigned long *bitmap; /* The actual bitmap! */ 43 unsigned long *bitmap; /* The actual bitmap! */
35 struct rb_root allocs; /* Tree of outstanding allocations. */ 44 struct rb_root allocs; /* Tree of outstanding allocations. */
36 45