diff options
author | alc <alc@FreeBSD.org> | 1999-08-23 18:08:34 +0000 |
---|---|---|
committer | alc <alc@FreeBSD.org> | 1999-08-23 18:08:34 +0000 |
commit | 980da3c115c705b1166479bf4bdeb1c1156b58aa (patch) | |
tree | 1293e78cda9bfc55944a3ec9acc9c7098b4a5bda /sys/vm | |
parent | eb943b47e00fe575463c1cf41339776ba2e8b371 (diff) | |
download | FreeBSD-src-980da3c115c705b1166479bf4bdeb1c1156b58aa.zip FreeBSD-src-980da3c115c705b1166479bf4bdeb1c1156b58aa.tar.gz |
struct vm_map:
The lock structure cannot be the first element of the vm_map
because this can result in livelock between two or more system
processes trying to kmem_alloc_wait.
Diffstat (limited to 'sys/vm')
-rw-r--r-- | sys/vm/vm_map.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sys/vm/vm_map.h b/sys/vm/vm_map.h index 3d0f1de..251029d 100644 --- a/sys/vm/vm_map.h +++ b/sys/vm/vm_map.h @@ -61,7 +61,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. * - * $Id: vm_map.h,v 1.45 1999/08/16 18:21:09 alc Exp $ + * $Id: vm_map.h,v 1.46 1999/08/18 03:56:57 mjacob Exp $ */ /* @@ -143,10 +143,17 @@ vm_map_entry_set_behavior(struct vm_map_entry *entry, u_char behavior) * by address. A single hint is provided to start * searches again from the last successful search, * insertion, or removal. + * + * Note: the lock structure cannot be the first element of vm_map + * because this can result in a running lockup between two or more + * system processes trying to kmem_alloc_wait() due to kmem_alloc_wait() + * and free tsleep/waking up 'map' and the underlying lockmgr also + * sleeping and waking up on 'map'. The lockup occurs when the map fills + * up. The 'exec' map, for example. */ struct vm_map { - struct lock lock; /* Lock for map data */ struct vm_map_entry header; /* List of entries */ + struct lock lock; /* Lock for map data */ int nentries; /* Number of entries */ vm_size_t size; /* virtual size */ unsigned char system_map; /* Am I a system map? */ |