]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
RDS: IB: use i_frag_sz for cache stat updates
authorSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 21 Mar 2016 10:49:30 +0000 (03:49 -0700)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 14 Apr 2016 00:58:27 +0000 (17:58 -0700)
Updates the receive cache statistics based on ic->i_frag_sz

Orabug: 21894138
Signed-off-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
net/rds/ib_recv.c

index f3f634e88135e1cccf2c5d271747533be08f00c9..aed1ecf7013485e0f0155318e0027b165b0031c7 100644 (file)
@@ -208,8 +208,8 @@ static void rds_ib_frag_free(struct rds_ib_connection *ic,
        rdsdebug("frag %p page %p\n", frag, sg_page(&frag->f_sg));
 
        rds_ib_recv_cache_put(&frag->f_cache_entry, &ic->i_cache_frags);
-       atomic_add(PAGE_SIZE/1024, &ic->i_cache_allocs);
-       rds_ib_stats_add(s_ib_recv_added_to_cache, PAGE_SIZE);
+       atomic_add(ic->i_frag_sz/1024, &ic->i_cache_allocs);
+       rds_ib_stats_add(s_ib_recv_added_to_cache, ic->i_frag_sz);
 }
 
 /* Recycle inc after freeing attached frags */
@@ -287,8 +287,8 @@ static struct rds_page_frag *rds_ib_refill_one_frag(struct rds_ib_connection *ic
        cache_item = rds_ib_recv_cache_get(&ic->i_cache_frags);
        if (cache_item) {
                frag = container_of(cache_item, struct rds_page_frag, f_cache_entry);
-               atomic_sub(PAGE_SIZE/1024, &ic->i_cache_allocs);
-               rds_ib_stats_add(s_ib_recv_removed_from_cache, PAGE_SIZE);
+               atomic_sub(ic->i_frag_sz/1024, &ic->i_cache_allocs);
+               rds_ib_stats_add(s_ib_recv_removed_from_cache, ic->i_frag_sz);
        } else {
                frag = kmem_cache_alloc(rds_ib_frag_slab, slab_mask);
                if (!frag)