sched_lock && thread_lock()

Alan Cox alc at cs.rice.edu
Fri May 25 07:04:27 UTC 2007


Attilio Rao wrote:

> Attilio Rao wrote:
>
>> Bruce Evans wrote:
>>
>>> 4 more translation errors breaking 8 counters altogether (v_vnodepgsin
>>> is broken twice):
>>
>>
>> Thanks a lot for the revision, there will be a pending patch in the 
>> next hour.
>
>
> Hello,
> Let me know if this patch is right for you and if you have feedbacks, 
> comments, etc:
> http://users.gufi.org/~rookie/works/patches/schedlock/vmmeter3.diff
>
> This should fix translation errors Bruce has found and switching the 
> _SET() method in order to being a simple assignment (as Bruce has 
> suggested).


I think there are still translation errors in vnode_pager.c:

This increment by 1 of cnt.v_vnodepgsin is incorrect:

@@ -909,8 +909,8 @@
        bp->b_runningbufspace = bp->b_bufsize;
        atomic_add_int(&runningbufspace, bp->b_runningbufspace);

-       VMCNT_ADD(vnodein, 1);
-       VMCNT_ADD(vnodepgsin, 1);
+       PCPU_LAZY_INC(cnt.v_vnodein);
+       PCPU_LAZY_INC(cnt.v_vnodepgsin);

        /* do the input */
        bp->b_iooffset = dbtob(bp->b_blkno);

Please double-check the others.

Alan



More information about the freebsd-arch mailing list