Hi Matt,

[...great comments on the VM writeup from the handbook...]

On Thu, 8 Mar 2001, Matt Dillon wrote:

>     This type of load is visible by noting the amount of page scanning
>     the system does (the 'sr' field in vmstat) and the number of reactivations
>     (the 're' field in vmstat).  A reactivation occurs when the system has
>     moved a page (typically) to the Inactive or Cache queue, but then some
>     program accesses it again and forces the system to take a VM fault and put
>     the page back into the Active queue.

About a year ago, I was looking through the VM code, and saw that the
're' field in vmstat is just Cache reactivations, and not both
Inactive & Cache.  I just figured it was how it was supposed to be.
Could it be that 're' should include *all* reactivations?

If so, would I be correct in suggesting:

Index: vm_page.c
===================================================================
RCS file: /home/ncvs/src/sys/vm/vm_page.c,v
retrieving revision 1.147.2.6
diff -u -r1.147.2.6 vm_page.c
--- vm_page.c   2001/03/03 23:06:09     1.147.2.6
+++ vm_page.c   2001/03/09 07:36:13
@@ -990,7 +990,8 @@

        s = splvm();
        if (m->queue != PQ_ACTIVE) {
-               if ((m->queue - m->pc) == PQ_CACHE)
+               if ((m->queue - m->pc) == PQ_CACHE ||
+                   (m->queue - m->pc) == PQ_INACTIVE)
                        cnt.v_reactivated++;

                vm_page_unqueue(m);

...or maybe even just something like ( (m->queue - m->pc) != PQ_FREE )

-Paul.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to