[PATCH 01/20] mm: print swapcache page count in show_swap_cache_info()
- From: Johannes Weiner <hannes@xxxxxxxxxxxx>
- Date: Fri, 04 Jul 2008 18:07:38 +0200
Most show_mem() implementations calculate the amount of pages within
the swapcache every time. Move the output to a more appropriate place
and use the anyway available total_swapcache_pages variable.
Signed-off-by: Johannes Weiner <hannes@xxxxxxxxxxxx>
---
mm/swap_state.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/mm/swap_state.c
+++ b/mm/swap_state.c
@@ -56,7 +56,8 @@ static struct {
void show_swap_cache_info(void)
{
- printk("Swap cache: add %lu, delete %lu, find %lu/%lu\n",
+ printk("%lu pages in swap cache\n", total_swapcache_pages);
+ printk("Swap cache stats: add %lu, delete %lu, find %lu/%lu\n",
swap_cache_info.add_total, swap_cache_info.del_total,
swap_cache_info.find_success, swap_cache_info.find_total);
printk("Free swap = %lukB\n", nr_swap_pages << (PAGE_SHIFT - 10));
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- References:
- [PATCH 00/20] generic show_mem() v5
- From: Johannes Weiner
- [PATCH 00/20] generic show_mem() v5
- Prev by Date: Re: [PATCH 4/5] byteorder: fix direct byteswap includes
- Next by Date: [PATCH -mm] fix s390-use-memory_read_from_buffer.patch
- Previous by thread: [PATCH 00/20] generic show_mem() v5
- Next by thread: [PATCH 02/20] lib: generic show_mem()
- Index(es):
Relevant Pages
|