Mulyadi Santosa wrote:
Hello everyone.
Here is patch to count per process swapped out pages. This patch is
created against 2.6.16.1. So far, I had tested by forcing certain task
to swap out (tail -f /dev/zero) and wait until top/vmstat/free reported
that swap is occupied.
Looks like a useful patch!
A few questions.
First, why do you keep this statistic on a per-VMA basis,
instead of a per-mm basis like most of the other statistics?
In zap_pte_range, the add_mm_rss() function adjusts the
mm statistics by potentially a large number. You only
adjust it by 1, and do not count how many swap pages were
freed by zap_pte_range. That looks like a bug.
Once you've fixed these issues, you might want to consider
submitting your patch to the linux-mm (at) kvack.org mailing
list instead. That's where the VM hackers hang out.
--
"You don't have to be crazy to do this... but it helps." -- Bob Ross
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/