mem-sharing: move (x86) / drop (Arm) arch_dump_shared_mem_info()

When !MEM_SHARING no useful output is produced. Move the function into
mm/mem_sharing.c while conditionalizing the call to it, thus allowing to
drop it altogether from Arm (and eliminating the need to introduce stubs
on PPC and RISC-V).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Luca Fancellu <luca.fancellu@arm.com> #arm
Acked-by: Stefano Stabellini <sstabellini@kernel.org>
Acked-by: Tamas K Lengyel <tamas@tklengyel.com>
This commit is contained in:
Jan Beulich committed 2023-08-22 08:52:49 +02:00
1 parent 5eb8c15171
commit db75dfdb11
4 files changed
+9 -11

No files matched your search

-4
View File
@@ -1294,10 +1294,6 @@ void free_init_memory(void)
printk("Freed %ldkB init memory.\n", (long)(__init_end-__init_begin)>>10);
}
void arch_dump_shared_mem_info(void)
{
}
int steal_page(
struct domain *d, struct page_info *page, unsigned int memflags)
{
-7
View File
@@ -6261,13 +6261,6 @@ void memguard_unguard_stack(void *p)
map_pages_to_xen((unsigned long)p, virt_to_mfn(p), 1, PAGE_HYPERVISOR_RW);
}
void arch_dump_shared_mem_info(void)
{
printk("Shared frames %u -- Saved frames %u\n",
mem_sharing_get_nr_shared_mfns(),
mem_sharing_get_nr_saved_mfns());
}
const struct platform_bad_page *__init get_platform_badpages(unsigned int *array_size)
{
u32 igd_id;
+7
View File
@@ -2329,3 +2329,10 @@ int mem_sharing_domctl(struct domain *d, struct xen_domctl_mem_sharing_op *mec)
return rc;
}
void arch_dump_shared_mem_info(void)
{
printk("Shared frames %u -- Saved frames %u\n",
mem_sharing_get_nr_shared_mfns(),
mem_sharing_get_nr_saved_mfns());
}
+2
View File
@@ -365,7 +365,9 @@ static void cf_check dump_domains(unsigned char key)
}
}
#ifdef CONFIG_MEM_SHARING
arch_dump_shared_mem_info();
#endif
rcu_read_unlock(&domlist_read_lock);
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.