mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Aaron Tomlin <atomlin@redhat.com>
To: Rafael Aquini <aquini@redhat.com>
Cc: linux-mm@kvack.org, Andrew Morton <akpm@linux-foundation.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: vmalloc: add cond_resched() in __vunmap()
Date: Wed, 23 Jun 2021 13:11:03 +0100	[thread overview]
Message-ID: <20210623121103.i2xpvhxqyf7wopl4@ava.usersys.com> (raw)
In-Reply-To: <20210622225030.478384-1-aquini@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 848 bytes --]

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@redhat.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@redhat.com>

-- 
Aaron Tomlin

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2021-06-23 12:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22 22:50 Rafael Aquini
2021-06-23  8:43 ` Nicholas Piggin
2021-06-23 17:30   ` Rafael Aquini
2021-06-23 11:27 ` Uladzislau Rezki
2021-06-23 17:34   ` Rafael Aquini
2021-06-23 20:14     ` Uladzislau Rezki
2021-06-23 12:11 ` Aaron Tomlin [this message]
2021-06-24 12:21 ` Michal Hocko
2021-06-24 14:23   ` Uladzislau Rezki
2021-06-25  8:51     ` Michal Hocko
2021-06-25 16:00       ` Uladzislau Rezki
2021-06-28 12:46         ` Michal Hocko
2021-06-28 16:40           ` Uladzislau Rezki
2021-06-29 14:11             ` Michal Hocko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210623121103.i2xpvhxqyf7wopl4@ava.usersys.com \
    --to=atomlin@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=aquini@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®