[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210623121103.i2xpvhxqyf7wopl4@ava.usersys.com>
Date: Wed, 23 Jun 2021 13:11:03 +0100
From: Aaron Tomlin <atomlin@...hat.com>
To: Rafael Aquini <aquini@...hat.com>
Cc: linux-mm@...ck.org, Andrew Morton <akpm@...ux-foundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: vmalloc: add cond_resched() in __vunmap()
On Tue 2021-06-22 18:50 -0400, Rafael Aquini wrote:
> Like in other range zapping routines that iterate over
> a large list, lets just add cond_resched() within __vunmap()'s
> page-releasing loop in order to avoid the watchdog splats.
>
> Signed-off-by: Rafael Aquini <aquini@...hat.com>
> ---
> mm/vmalloc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/mm/vmalloc.c b/mm/vmalloc.c
> index a13ac524f6ff..cd4b23d65748 100644
> --- a/mm/vmalloc.c
> +++ b/mm/vmalloc.c
> @@ -2564,6 +2564,7 @@ static void __vunmap(const void *addr, int deallocate_pages)
>
> BUG_ON(!page);
> __free_pages(page, page_order);
> + cond_resched();
> }
> atomic_long_sub(area->nr_pages, &nr_vmalloc_pages);
>
> --
> 2.26.3
>
Good catch.
Reviewed-by: Aaron Tomlin <atomlin@...hat.com>
--
Aaron Tomlin
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists