@@ -448,7 +448,7 @@ static ssize_t node_read_meminfo(struct device *dev,
nid, K(i.sharedram),
nid, node_page_state(pgdat, NR_KERNEL_STACK_B) / SZ_1K,
#ifdef CONFIG_SHADOW_CALL_STACK
- nid, node_page_state(pgdat, NR_KERNEL_SCS_KB),
+ nid, node_page_state(pgdat, NR_KERNEL_SCS_B) / SZ_1K,
#endif
nid, K(sum_zone_node_page_state(nid, NR_PAGETABLE)),
nid, 0UL,
@@ -104,7 +104,7 @@ static int meminfo_proc_show(struct seq_file *m, void *v)
global_node_page_state(NR_KERNEL_STACK_B) / SZ_1K);
#ifdef CONFIG_SHADOW_CALL_STACK
seq_printf(m, "ShadowCallStack:%8lu kB\n",
- global_node_page_state(NR_KERNEL_SCS_KB));
+ global_node_page_state(NR_KERNEL_SCS_B) / SZ_1K);
#endif
show_val_kb(m, "PageTables: ",
global_zone_page_state(NR_PAGETABLE));
@@ -204,7 +204,7 @@ enum node_stat_item {
NR_FOLL_PIN_RELEASED, /* pages returned via unpin_user_page() */
NR_KERNEL_STACK_B, /* measured in byte */
#if IS_ENABLED(CONFIG_SHADOW_CALL_STACK)
- NR_KERNEL_SCS_KB, /* measured in KiB */
+ NR_KERNEL_SCS_B, /* measured in byte */
#endif
NR_VM_NODE_STAT_ITEMS
};
@@ -17,8 +17,8 @@ static void __scs_account(void *s, int account)
{
struct page *scs_page = virt_to_page(s);
- mod_node_page_state(page_pgdat(scs_page), NR_KERNEL_SCS_KB,
- account * (SCS_SIZE / SZ_1K));
+ mod_node_page_state(page_pgdat(scs_page), NR_KERNEL_SCS_B,
+ account * SCS_SIZE);
}
static void *scs_alloc(int node)
@@ -5574,7 +5574,7 @@ void show_free_areas(unsigned int filter, nodemask_t *nodemask)
K(node_page_state(pgdat, NR_WRITEBACK_TEMP)),
node_page_state(pgdat, NR_KERNEL_STACK_B) / SZ_1K,
#ifdef CONFIG_SHADOW_CALL_STACK
- node_page_state(pgdat, NR_KERNEL_SCS_KB),
+ node_page_state(pgdat, NR_KERNEL_SCS_B) / SZ_1K,
#endif
pgdat->kswapd_failures >= MAX_RECLAIM_RETRIES ?
"yes" : "no");
Convert NR_KERNEL_SCS_KB account to bytes Signed-off-by: Muchun Song <songmuchun@bytedance.com> --- drivers/base/node.c | 2 +- fs/proc/meminfo.c | 2 +- include/linux/mmzone.h | 2 +- kernel/scs.c | 4 ++-- mm/page_alloc.c | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-)