[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAPcyv4j-JANFd_b0x8fPd3=OsfGk+SDmdSZhMVyrQowex5r6KQ@mail.gmail.com>
Date: Mon, 19 Apr 2021 17:33:10 -0700
From: Dan Williams <dan.j.williams@...el.com>
To: Jane Chu <jane.chu@...cle.com>
Cc: Naoya Horiguchi <naoya.horiguchi@....com>,
Dave Jiang <dave.jiang@...el.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Linux MM <linux-mm@...ck.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] mm/memory-failure: unecessary amount of unmapping
On Mon, Apr 19, 2021 at 5:28 PM Jane Chu <jane.chu@...cle.com> wrote:
>
> It appears that unmap_mapping_range() actually takes a 'size' as its
> third argument rather than a location,
Indeed.
> the current calling fashion
> causes unecessary amount of unmapping to occur.
s/unecessary/unnecessary/
>
> Fixes: 6100e34b2526e ("mm, memory_failure: Teach memory_failure() about dev_pagemap pages")
> Signed-off-by: Jane Chu <jane.chu@...cle.com>
Other than changelog fixup, looks good.
Reviewed-by: Dan Williams <dan.j.williams@...el.com>
> ---
> mm/memory-failure.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index f7ed9559d494..85ad98c00fd9 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -1368,7 +1368,7 @@ static int memory_failure_dev_pagemap(unsigned long pfn, int flags,
> * communicated in siginfo, see kill_proc()
> */
> start = (page->index << PAGE_SHIFT) & ~(size - 1);
> - unmap_mapping_range(page->mapping, start, start + size, 0);
> + unmap_mapping_range(page->mapping, start, size, 0);
> }
> kill_procs(&tokill, flags & MF_MUST_KILL, !unmap_success, pfn, flags);
> rc = 0;
> --
> 2.18.4
>
Powered by blists - more mailing lists