CLEANUP: pools: remove the now unused pool_is_crowded()
This function was renderred obsolete by commita0b5831ee
("MEDIUM: pools: centralize cache eviction in a common function") which replaced its last call inside the loop with a single call out of the loop to pool_releasable() as introduced by commit91a8e28f9
("MINOR: pool: add a function to estimate how many may be released at once"). Let's remove it before it becomes wrong and used again.
This commit is contained in:
parent
9f699958dc
commit
9de8a2b854
|
@ -144,12 +144,6 @@ void pool_put_to_cache(struct pool_head *pool, void *ptr, const void *caller);
|
|||
|
||||
#if defined(CONFIG_HAP_NO_GLOBAL_POOLS)
|
||||
|
||||
static inline int pool_is_crowded(const struct pool_head *pool)
|
||||
{
|
||||
/* no shared pools, hence they're always full */
|
||||
return 1;
|
||||
}
|
||||
|
||||
static inline uint pool_releasable(const struct pool_head *pool)
|
||||
{
|
||||
/* no room left */
|
||||
|
@ -171,13 +165,6 @@ static inline void pool_put_to_shared_cache(struct pool_head *pool, struct pool_
|
|||
void pool_refill_local_from_shared(struct pool_head *pool, struct pool_cache_head *pch);
|
||||
void pool_put_to_shared_cache(struct pool_head *pool, struct pool_item *item, uint count);
|
||||
|
||||
/* returns true if the pool is considered to have too many free objects */
|
||||
static inline int pool_is_crowded(const struct pool_head *pool)
|
||||
{
|
||||
return pool->allocated >= swrate_avg(pool->needed_avg + pool->needed_avg / 4, POOL_AVG_SAMPLES) &&
|
||||
(int)(pool->allocated - pool->used) >= pool->minavail;
|
||||
}
|
||||
|
||||
/* Returns the max number of entries that may be brought back to the pool
|
||||
* before it's considered as full. Note that it is only usable for releasing
|
||||
* objects, hence the function assumes that no more than ->used entries will
|
||||
|
|
Loading…
Reference in New Issue