cvs commit: src/sys/vm swap_pager.c uma_core.c vm_object.c
vm_object.h
Alan Cox
alc at FreeBSD.org
Thu Jul 22 12:44:49 PDT 2004
alc 2004-07-22 19:44:49 UTC
FreeBSD src repository
Modified files:
sys/vm swap_pager.c uma_core.c vm_object.c
vm_object.h
Log:
- Change uma_zone_set_obj() to call kmem_alloc_nofault() instead of
kmem_alloc_pageable(). The difference between these is that an errant
memory access to the zone will be detected sooner with
kmem_alloc_nofault().
The following changes serve to eliminate the following lock-order
reversal reported by witness:
1st 0xc1a3c084 vm object (vm object) @ vm/swap_pager.c:1311
2nd 0xc07acb00 swap_pager swhash (swap_pager swhash) @ vm/swap_pager.c:1797
3rd 0xc1804bdc vm object (vm object) @ vm/uma_core.c:931
There is no potential deadlock in this case. However, witness is unable
to recognize this because vm objects used by UMA have the same type as
ordinary vm objects. To remedy this, we make the following changes:
- Add a mutex type argument to VM_OBJECT_LOCK_INIT().
- Use the mutex type argument to assign distinct types to special
vm objects such as the kernel object, kmem object, and UMA objects.
- Define a static swap zone object for use by UMA. (Only static
objects are assigned a special mutex type.)
Revision Changes Path
1.255 +2 -1 src/sys/vm/swap_pager.c
1.102 +2 -2 src/sys/vm/uma_core.c
1.326 +3 -8 src/sys/vm/vm_object.c
1.105 +3 -2 src/sys/vm/vm_object.h
More information about the cvs-all
mailing list