diff options
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/rhashtable.h | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/include/linux/rhashtable.h b/include/linux/rhashtable.h index cb2104be2135..d438eeb08bff 100644 --- a/include/linux/rhashtable.h +++ b/include/linux/rhashtable.h | |||
| @@ -79,12 +79,6 @@ struct rhashtable; | |||
| 79 | * @locks_mul: Number of bucket locks to allocate per cpu (default: 128) | 79 | * @locks_mul: Number of bucket locks to allocate per cpu (default: 128) |
| 80 | * @hashfn: Function to hash key | 80 | * @hashfn: Function to hash key |
| 81 | * @obj_hashfn: Function to hash object | 81 | * @obj_hashfn: Function to hash object |
| 82 | * @grow_decision: If defined, may return true if table should expand | ||
| 83 | * @shrink_decision: If defined, may return true if table should shrink | ||
| 84 | * | ||
| 85 | * Note: when implementing the grow and shrink decision function, min/max | ||
| 86 | * shift must be enforced, otherwise, resizing watermarks they set may be | ||
| 87 | * useless. | ||
| 88 | */ | 82 | */ |
| 89 | struct rhashtable_params { | 83 | struct rhashtable_params { |
| 90 | size_t nelem_hint; | 84 | size_t nelem_hint; |
| @@ -98,10 +92,6 @@ struct rhashtable_params { | |||
| 98 | size_t locks_mul; | 92 | size_t locks_mul; |
| 99 | rht_hashfn_t hashfn; | 93 | rht_hashfn_t hashfn; |
| 100 | rht_obj_hashfn_t obj_hashfn; | 94 | rht_obj_hashfn_t obj_hashfn; |
| 101 | bool (*grow_decision)(const struct rhashtable *ht, | ||
| 102 | size_t new_size); | ||
| 103 | bool (*shrink_decision)(const struct rhashtable *ht, | ||
| 104 | size_t new_size); | ||
| 105 | }; | 95 | }; |
| 106 | 96 | ||
| 107 | /** | 97 | /** |
| @@ -193,9 +183,6 @@ int rhashtable_init(struct rhashtable *ht, struct rhashtable_params *params); | |||
| 193 | void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node); | 183 | void rhashtable_insert(struct rhashtable *ht, struct rhash_head *node); |
| 194 | bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node); | 184 | bool rhashtable_remove(struct rhashtable *ht, struct rhash_head *node); |
| 195 | 185 | ||
| 196 | bool rht_grow_above_75(const struct rhashtable *ht, size_t new_size); | ||
| 197 | bool rht_shrink_below_30(const struct rhashtable *ht, size_t new_size); | ||
| 198 | |||
| 199 | int rhashtable_expand(struct rhashtable *ht); | 186 | int rhashtable_expand(struct rhashtable *ht); |
| 200 | int rhashtable_shrink(struct rhashtable *ht); | 187 | int rhashtable_shrink(struct rhashtable *ht); |
| 201 | 188 | ||
