On Mon, Apr 18, 2011 at 10:05:57PM +0200, Samuel Thibault wrote: > I don't think this patch can be applied. Building a list and then > freeing it was done for some reason, at least because kmem_free, (thus > vm_map_delete), may actually need to use zalloc in order to split > some areas (which is actually the reason for the double map_entry > allocation/release), which thus needs to lock the zone, and thus ends up > with a deadlock.
This change seems rather dangerous. It brings no real improvement while adding a potential deadlock. In addition to avoiding deadlocks, freeing list elements in two steps is also a technique commonly used to reduce contention. -- Richard Braun