[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
zone_gc and vm_map deadlock
From: |
Samuel Thibault |
Subject: |
zone_gc and vm_map deadlock |
Date: |
Wed, 22 Apr 2009 22:54:33 +0200 |
User-agent: |
Mutt/1.5.12-2006-07-14 |
Hello,
I've often seen gnumach deadlocking in this situation:
lock_write (kern/lock.c:284).
kmem_alloc_wired(zone_map) (vm/vm_kern.c:537).
zget_space (kern/zalloc.c:316).
zalloc (kern/zalloc.c:508).
_vm_map_entry_create (vm/vm_map.c:262).
_vm_map_clip_end (vm/vm_map.c:1094).
vm_map_delete (vm/vm_map.c:1704).
vm_map_remove (vm/vm_map.c:1757).
kmem_free(zone_map) (vm/vm_kern.c:699).
consider_zone_gc (kern/zalloc.c:826).
vm_pageout_scan (vm/vm_pageout.c:559).
vm_pageout_continue (vm/vm_pageout.c:903).
The problem here is that kmem_free(zone_map) leads to a call to
vm_ma_delete which locks zone_map and leads to a zalloc call (for the
new entry because of splitting), which needs to call zget_space and
thus kmem_alloc_wired(zone_map), which _also_ tries to lock zone_map...
Unfortunately we can not afford to just avoid the second lock, as it may
completely thrash what vm_map_delete is doing...
Samuel
- zone_gc and vm_map deadlock,
Samuel Thibault <=