Date: Fri, 25 May 2007 00:33:40 +0200 From: Attilio Rao <attilio@FreeBSD.org> To: Alan Cox <alc@cs.rice.edu> Cc: alc@freebsd.org, arch@freebsd.org, Jeff Roberson <jeff@freebsd.org>, Bruce Evans <bde@optusnet.com.au> Subject: Re: sched_lock && thread_lock() Message-ID: <465612C4.3040400@FreeBSD.org> In-Reply-To: <46558E43.8040608@cs.rice.edu> References: <20070520155103.K632@10.0.0.1> <20070521113648.F86217@besplex.bde.org> <20070520213132.K632@10.0.0.1> <4651CAB8.8070007@FreeBSD.org> <4651CE2F.8080908@FreeBSD.org> <20070521022847.D679@10.0.0.1> <20070521195811.G56785@delplex.bde.org> <4651FCB5.7070604@FreeBSD.org> <20070521225032.C57233@delplex.bde.org> <20070522162819.N5249@besplex.bde.org> <20070522201336.C87981@besplex.bde.org> <46533CAD.8030104@FreeBSD.org> <4655C67A.9060000@FreeBSD.org> <46558E43.8040608@cs.rice.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
Alan Cox wrote: > 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). > > > Let me offer a simple rule of thumb for VMCNT_ADD() vs. PCPU_LAZY_INC(): > If the field is NOT under the section labeled "Distribution of page > usages." in vmmeter, then PCPU_LAZY_INC() is preferable to VMCNT_ADD() > implemented with an atomic op. Ok, I've updated the patch following your suggestion. I just left out that vmmeter fields which needs to be incremented not by one but by another value (since PCPU_LAZY_INC() just increments by 1). Do you think it is more appropriate to expand the PCPU_LAZY_*() interface and let it cover increments not by 1 too? It would let grow the patch notably since we need to touch all architectures for that however... Thanks, Attilio
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?465612C4.3040400>