Re: [RFC PATCH 3/3] mm/vmalloc.c: change _vm_unmap_aliases() to do purge firstly

Thomas Gleixner
2023-05-19T14:17:13Z

On Fri, May 19 2023 at 20:03, Baoquan He wrote:
> @@ -2245,6 +2260,9 @@ static void _vm_unmap_aliases(unsigned long start, unsigned long end, int flush)
>
> might_sleep();
>
> + mutex_lock(&vmap_purge_lock);
> + purge_fragmented_blocks_allcpus();
> +
> for_each_possible_cpu(cpu) {

That still does TWO iterations over all possible CPUs, while this really
could be one.