Re: [RFC PATCH 1/8] mm, vmalloc: change iterating a vmlist to find_vm_area()

From: JoonSoo Kim
Date: Fri Dec 07 2012 - 08:40:00 EST


Hello, Pekka.

2012/12/7 Pekka Enberg <penberg@xxxxxxxxxx>:
> On Thu, Dec 6, 2012 at 6:09 PM, Joonsoo Kim <js1304@xxxxxxxxx> wrote:
>> The purpose of iterating a vmlist is finding vm area with specific
>> virtual address. find_vm_area() is provided for this purpose
>> and more efficient, because it uses a rbtree.
>> So change it.
>
> You no longer take the 'vmlist_lock'. This is safe, because...?

As Bob mentioned, find_vm_area() hold a 'vmap_area_lock' during
searching a area.
When we hold a 'vmap_area_lock', area can't be removed.
So this change is safe.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/