Skip to content

Commit dbdd7f3

Browse files
Arumugam Kolappanvijay-suman
authored andcommitted
rds/ib: decrement ib_rx_total_incs after releasing associated cache
rds_ib_cache_gc_worker() runs periodically and releases unused receive cache entries ('incs', 'frags') from all the CPUs. Currently, RDS does not decrease ib_rx_total_incs counter after freeing 'incs' cache. This makes the counter to report hugh value over time. This patch fixes it by decrementing the counter after free. Orabug: 36760266 Fixes: 8450b32 ("RDS-IB: Add garbage-collection to cache") Reported-by: Rama Nichanamatlu <[email protected]> Signed-off-by: Arumugam Kolappan <[email protected]> Reviewed-by: Håkon Bugge <[email protected]> Signed-off-by: Vijayendra Suman <[email protected]>
1 parent 815ce86 commit dbdd7f3

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

net/rds/ib.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,7 @@ void rds_ib_free_one_inc(struct rds_ib_incoming *inc)
387387
inc->ii_cache_entry.next = 0;
388388
WARN_ON(!list_empty(&inc->ii_frags));
389389
kmem_cache_free(rds_ib_incoming_slab, inc);
390+
rds_ib_stats_dec(s_ib_rx_total_incs);
390391
}
391392

392393
static void rds_ib_free_inc_cache_one(struct rds_ib_refill_cache *cache, int cpu)

0 commit comments

Comments
 (0)