DragonFly commits List (threaded) for 2008-04
DragonFly BSD
DragonFly commits List (threaded) for 2008-04
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: cvs commit: src/sys/kern kern_umtx.c src/sys/vm vm_fault.c vm_page.c vm_page.h vm_page2.h


From: "Simon 'corecode' Schubert" <corecode@xxxxxxxxxxxx>
Date: Tue, 15 Apr 2008 05:10:04 -0700

Matthew Dillon wrote:
>   Log:
>   Fix a bug in umtx_sleep().  This function sleeps on the mutex's physical
>   address and will get lost if the physical page underlying the VM address is
>   copied on write.  This case can occur when a threaded program fork()'s.
>   
>   Introduce a VM page event notification mechanism and use it to wake-up
>   the umtx_sleep() if the underlying page takes a COW fault.

While this doesn't seem like a very big hack, I still wonder how we could do this more elegantly.  Essentially, the locking process should not lose the physical page, I'd say.  The newly forked process may not use this lock anyways.  How are other OSes dealing with this?  Or are they simply disallowing futexes/umutexes for inter-process locking?

cheers
  simon


Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]