x86: Remove redundant display of free swap space in show_mem()
PATCH 1/1 x86: Remove redundant display of free swap space in show_mem()
From: Johannes Weiner <[email protected]>
show_free_areas() already displays free swap space, no need to do it a second time in show_mem() which calls the former anyway.
--- arch/x86/mm/init_64.c | 3 --- arch/x86/mm/pgtable_32.c | 1 - 2 files changed, 0 insertions(+), 4 deletions(-)
arch/x86/mm/init_64.c +0 -3
@@ -89,9 +89,6 @@ void show_mem(void)printk (KERN_INFO "Mem-info:\n" );show_free_areas (); -printk (KERN_INFO "Free swap: %6ldkB\n" , - nr_swap_pages << (PAGE_SHIFT -10 )); -for_each_online_pgdat (pgdat) {for (i =0 ; i < pgdat->node_spanned_pages; ++i) {/*
arch/x86/mm/pgtable_32.c +0 -1
@@ -32,7 +32,6 @@ void show_mem(void)printk (KERN_INFO "Mem-info:\n" );show_free_areas (); -printk (KERN_INFO "Free swap: %6ldkB\n" , nr_swap_pages<<(PAGE_SHIFT -10 ));for_each_online_pgdat (pgdat) {pgdat_resize_lock (pgdat, &flags);for (i =0 ; i < pgdat->node_spanned_pages; ++i) {
Signature · 1 line
1.5.2.2
Quoted 6 lines · Johannes Weiner
From: Johannes Weiner <[email protected]>
show_free_areas()already displays free swap space, no need to do it a second time inshow_mem()which calls the former anyway.Signed-off-by Johannes Weiner <[email protected]>
I heartily approve of this; and yes, it's the per-arch one which should go (since its "alignment" looks nasty). But there's a lot more arches than just x86 which should be fixed (and so rather more work, preparing those patches for the various maintainers) - is that something you'd have time to do? (Don't worry, "No" is a perfectly fair answer, and it's no way essential that all change at once.)
Thanks,
Hugh
Quoted 31 lines
--- arch/x86/mm/init_64.c | 3 --- arch/x86/mm/pgtable_32.c | 1 - 2 files changed, 0 insertions(+), 4 deletions(-)arch/x86/mm/init_64.c +0
-3@@ -89,9 +89,6 @@ void show_mem(void)printk (KERN_INFO "Mem-info:\n" );show_free_areas (); -printk (KERN_INFO "Free swap: %6ldkB\n" , - nr_swap_pages << (PAGE_SHIFT -10 )); -for_each_online_pgdat (pgdat) {for (i =0 ; i < pgdat->node_spanned_pages; ++i) {/* arch/x86/mm/pgtable_32.c +0
-1@@ -32,7 +32,6 @@ void show_mem(void)printk (KERN_INFO "Mem-info:\n" );show_free_areas (); -printk (KERN_INFO "Free swap: %6ldkB\n" , nr_swap_pages<<(PAGE_SHIFT -10 ));for_each_online_pgdat (pgdat) {pgdat_resize_lock (pgdat, &flags);for (i =0 ; i < pgdat->node_spanned_pages; ++i) {
Hi,
Quoted 6 lines · Hugh Dickins
Quoted 5 lines · Johannes Weiner
From: Johannes Weiner <[email protected]>
show_free_areas()already displays free swap space, no need to do it a second time inshow_mem()which calls the former anyway.
Quoted 8 lines
Quoted 1 line
Signed-off-by Johannes Weiner <[email protected]>I heartily approve of this; and yes, it's the per-arch one which should go (since its "alignment" looks nasty). But there's a lot more arches than just x86 which should be fixed (and so rather more work, preparing those patches for the various maintainers) - is that something you'd have time to do? (Don't worry, "No" is a perfectly fair answer, and it's no way essential that all change at once.)
Yes, I will whip something up. Thanks for the feedback.
Hannes
Ingo Molnar
AppliedQuoted 4 lines · Johannes Weiner
From: Johannes Weiner <[email protected]>
show_free_areas()already displays free swap space, no need to do it a second time inshow_mem()which calls the former anyway.
thanks, applied.
Ingo