linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: Jane Chu <jane.chu@oracle.com>
Cc: Naoya Horiguchi <naoya.horiguchi@nec.com>,
	Dave Jiang <dave.jiang@intel.com>,
	 Andrew Morton <akpm@linux-foundation.org>,
	Linux MM <linux-mm@kvack.org>,
	 Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mm/memory-failure: unecessary amount of unmapping
Date: Mon, 19 Apr 2021 17:33:10 -0700	[thread overview]
Message-ID: <CAPcyv4j-JANFd_b0x8fPd3=OsfGk+SDmdSZhMVyrQowex5r6KQ@mail.gmail.com> (raw)
In-Reply-To: <20210420002821.2749748-1-jane.chu@oracle.com>

On Mon, Apr 19, 2021 at 5:28 PM Jane Chu <jane.chu@oracle.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@oracle.com>

Other than changelog fixup, looks good.

Reviewed-by: Dan Williams <dan.j.williams@intel.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
>


  reply	other threads:[~2021-04-20  0:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-20  0:28 Jane Chu
2021-04-20  0:33 ` Dan Williams [this message]
2021-04-20  0:48 ` HORIGUCHI NAOYA(堀口 直也)

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='CAPcyv4j-JANFd_b0x8fPd3=OsfGk+SDmdSZhMVyrQowex5r6KQ@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=dave.jiang@intel.com \
    --cc=jane.chu@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=naoya.horiguchi@nec.com \
    /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