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

Simon 'corecode' Schubert corecode at fs.ei.tum.de
Tue Apr 15 05:12:00 PDT 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pgp00007.pgp
Type: application/octet-stream
Size: 252 bytes
Desc: "Description: OpenPGP digital signature"
URL: <http://lists.dragonflybsd.org/pipermail/commits/attachments/20080415/c9c005cc/attachment-0017.obj>


More information about the Commits mailing list