numa_maps: include display of writeback pages, remove pagelocked. 1. Remove pagelocked display. Works only sporadically for page migration. 2. Add writeback counter as requested by Andrew 3. Escape some more characters when displaying filenames so that a program can parse or skip the filename in a reasonable way. Signed-off-by: Christoph Lameter Index: linux-2.6.16-rc5-mm2/mm/mempolicy.c =================================================================== --- linux-2.6.16-rc5-mm2.orig/mm/mempolicy.c 2006-03-06 09:10:13.000000000 -0800 +++ linux-2.6.16-rc5-mm2/mm/mempolicy.c 2006-03-06 09:12:50.000000000 -0800 @@ -1786,7 +1786,7 @@ struct numa_maps { unsigned long pages; unsigned long anon; unsigned long active; - unsigned long locked; + unsigned long writeback; unsigned long mapcount_max; unsigned long dirty; unsigned long swapcache; @@ -1808,8 +1808,8 @@ static void gather_stats(struct page *pa if (PageActive(page)) md->active++; - if (PageLocked(page)) - md->locked++; + if (PageWriteback(page)) + md->writeback++; if (PageAnon(page)) md->anon++; @@ -1871,7 +1871,7 @@ int show_numa_map(struct seq_file *m, vo if (file) { seq_printf(m, " file="); - seq_path(m, file->f_vfsmnt, file->f_dentry, "\n\t"); + seq_path(m, file->f_vfsmnt, file->f_dentry, "\n\t= "); } else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) { seq_printf(m, " heap"); } else if (vma->vm_start <= mm->start_stack && @@ -1908,8 +1908,8 @@ int show_numa_map(struct seq_file *m, vo if (md->active < md->pages && !is_vm_hugetlb_page(vma)) seq_printf(m," active=%lu", md->active); - if (md->locked) - seq_printf(m," locked=%lu", md->locked); + if (md->writeback) + seq_printf(m," writeback=%lu", md->writeback); for_each_online_node(n) if (md->node[n])