Blame SOURCES/procps-ng-3.3.10-slabtop-use-val-float.patch

bc8a7c
diff -up ./proc/slab.c.ori ./proc/slab.c
bc8a7c
--- ./proc/slab.c.ori	2017-03-13 17:14:22.684744976 +0100
bc8a7c
+++ ./proc/slab.c	2017-03-13 17:14:28.836719945 +0100
bc8a7c
@@ -179,7 +179,7 @@ static int parse_slabinfo20(struct slab_
bc8a7c
 		curr->cache_size = (unsigned long)curr->nr_slabs * curr->pages_per_slab * page_size;
bc8a7c
 
bc8a7c
 		if (curr->nr_objs) {
bc8a7c
-			curr->use = 100 * curr->nr_active_objs / curr->nr_objs;
bc8a7c
+			curr->use = 100 * (float)curr->nr_active_objs / curr->nr_objs;
bc8a7c
 			stats->nr_active_caches++;
bc8a7c
 		} else
bc8a7c
 			curr->use = 0;
bc8a7c
@@ -258,7 +258,7 @@ static int parse_slabinfo11(struct slab_
bc8a7c
 		curr->cache_size = (unsigned long)curr->nr_slabs * curr->pages_per_slab * page_size;
bc8a7c
 
bc8a7c
 		if (curr->nr_objs) {
bc8a7c
-			curr->use = 100 * curr->nr_active_objs / curr->nr_objs;
bc8a7c
+			curr->use = 100 * (float)curr->nr_active_objs / curr->nr_objs;
bc8a7c
 			stats->nr_active_caches++;
bc8a7c
 		} else
bc8a7c
 			curr->use = 0;