cvs commit: src/sys/alpha/alpha pmap.c src/sys/amd64/amd64 pmap.c src/sys/i386/i386 pmap.c src/sys/vm vm_page.c

Pawel Jakub Dawidek pjd at
Thu Jul 29 12:52:04 PDT 2004

On Thu, Jul 29, 2004 at 03:41:03PM -0400, Robert Watson wrote:
+> On Thu, 29 Jul 2004, Scott Long wrote:
+> > >    - Enable recursion on the page queues lock.  This allows calls to
+> > >      vm_page_alloc(VM_ALLOC_NORMAL) and UMA's obj_alloc() with the page
+> > >      queues lock held.  Such calls are made to allocate page table pages
+> > >      and pv entries.
+> > 
+> > My understanding is that recursive mutexes are quite expensive.  Is
+> > recursion a common occurrance now, and is there a good way to
+> > profile/measure these paths? 
+> No opinion on the change itself, but just to clarify this wording a little
+> for those reading who don't follow the locking work blow-by-blow: flagging
+> a mutex as recursive itself is not expensive, but the act of recursing the
+> mutex is expensive. 

Hmm, why? Code seems to be very simple, I would even risk: simpler than
when lock is obtained at first time (but still one atomic operation...).
I'm not saying here that you don't know what you're talking about, I'm
just looking for an explanation.

Pawel Jakub Dawidek             
pjd at                 
FreeBSD committer                         Am I Evil? Yes, I Am!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url :

More information about the cvs-all mailing list