Re: vmalloc performance

From: Minchan Kim
Date: Wed Apr 14 2010 - 11:12:52 EST


On Wed, Apr 14, 2010 at 11:24 PM, Steven Whitehouse <steve@xxxxxxxxxxx> wrote:
> Hi,
>
> Also, what lock should be protecting this code:
>
> Â Â Â Âva->flags |= VM_LAZY_FREE;
> Â Â Â Âatomic_add((va->va_end - va->va_start) >> PAGE_SHIFT,
> &vmap_lazy_nr);
>
> in free_unmap_vmap_area_noflush() ? It seem that if
> __purge_vmap_area_lazy runs between the two statements above that the
> number of pages contained in vmap_lazy_nr will be incorrect. Maybe the
> two statements should just be reversed? I can't see any reason that the
> flag assignment would be atomic either. In recent tests, including the
> patch below, the following has been reported to me:

It was already fixed.
https://patchwork.kernel.org/patch/89783/

Thanks.

--
Kind regards,
Minchan Kim
--
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/