taskstats: properly account NR_KERNEL_MISC_RECLAIMABLE

NR_KERNEL_MISC_RECLAIMABLE contains the info in pages but accounting is
done considering it as bytes. Fix it.

Change-Id: I99a3bd43b7b77f6b137e1cc4c1854392d4a47635
Fixes: 5a5b186dfb ("taskstats: add support for system stats")
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
This commit is contained in:
Charan Teja Reddy 2021-05-28 15:38:54 +05:30 committed by Gerrit - the friendly Code Review server
parent 9585c2cb84
commit 04dbe55b1b

View File

@ -482,7 +482,7 @@ static void sysstats_build(struct sys_memstats *stats)
stats->version = SYSSTATS_VERSION; stats->version = SYSSTATS_VERSION;
stats->memtotal = K(i.totalram); stats->memtotal = K(i.totalram);
stats->reclaimable = stats->reclaimable =
global_node_page_state(NR_KERNEL_MISC_RECLAIMABLE) >> 10; K(global_node_page_state(NR_KERNEL_MISC_RECLAIMABLE));
stats->swap_used = K(i.totalswap - i.freeswap); stats->swap_used = K(i.totalswap - i.freeswap);
stats->swap_total = K(i.totalswap); stats->swap_total = K(i.totalswap);
stats->vmalloc_total = K(vmalloc_nr_pages()); stats->vmalloc_total = K(vmalloc_nr_pages());