diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2022-01-09 20:48:31 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:09:29 -0400 |
commit | f25d8215f499418c17dfde0b3158a66e03c758dc (patch) | |
tree | 2239ac974b58f41e6687a840c21cf2156795fded /fs/bcachefs/alloc_types.h | |
parent | c6b2826cd14c5421bc50a768e923d078a71139c1 (diff) |
bcachefs: Kill allocator threads & freelists
Now that we have new persistent data structures for the allocator, this
patch converts the allocator to use them.
Now, foreground bucket allocation uses the freespace btree to find
buckets to allocate, instead of popping buckets off the freelist.
The background allocator threads are no longer needed and are deleted,
as well as the allocator freelists. Now we only need background tasks
for invalidating buckets containing cached data (when we are low on
empty buckets), and for issuing discards.
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_types.h')
-rw-r--r-- | fs/bcachefs/alloc_types.h | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/fs/bcachefs/alloc_types.h b/fs/bcachefs/alloc_types.h index 9e00afb17559..b3bef7074511 100644 --- a/fs/bcachefs/alloc_types.h +++ b/fs/bcachefs/alloc_types.h @@ -10,18 +10,6 @@ struct ec_bucket_buf; -#define ALLOC_THREAD_STATES() \ - x(stopped) \ - x(running) \ - x(blocked) \ - x(blocked_full) - -enum allocator_states { -#define x(n) ALLOCATOR_##n, - ALLOC_THREAD_STATES() -#undef x -}; - #define BCH_ALLOC_RESERVES() \ x(btree_movinggc) \ x(btree) \ @@ -32,11 +20,8 @@ enum alloc_reserve { #define x(name) RESERVE_##name, BCH_ALLOC_RESERVES() #undef x - RESERVE_NR }; -typedef FIFO(long) alloc_fifo; - #define OPEN_BUCKETS_COUNT 1024 #define WRITE_POINT_HASH_NR 32 @@ -127,12 +112,4 @@ struct write_point_specifier { unsigned long v; }; -struct alloc_heap_entry { - size_t bucket; - size_t nr; - unsigned long key; -}; - -typedef HEAP(struct alloc_heap_entry) alloc_heap; - #endif /* _BCACHEFS_ALLOC_TYPES_H */ |