From: Minchan Kim <minchan@kernel.org>
To: Yang Shi <shy828301@gmail.com>
Cc: hughd@google.com, ziy@nvidia.com,
kirill.shutemov@linux.intel.com, naoya.horiguchi@nec.com,
wangyugui@e16-tech.com, akpm@linux-foundation.org,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [v4 PATCH 2/2] mm: rmap: make try_to_unmap() void function
Date: Wed, 26 May 2021 15:29:30 -0700 [thread overview]
Message-ID: <YK7LykQE0LzysBYU@google.com> (raw)
In-Reply-To: <20210526201239.3351-2-shy828301@gmail.com>
On Wed, May 26, 2021 at 01:12:39PM -0700, Yang Shi wrote:
> Currently try_to_unmap() return bool value by checking page_mapcount(),
> however this may return false positive since page_mapcount() doesn't
> check all subpages of compound page. The total_mapcount() could be used
> instead, but its cost is higher since it traverses all subpages.
>
> Actually the most callers of try_to_unmap() don't care about the
> return value at all. So just need check if page is still mapped by
> page_mapped() when necessary. And page_mapped() does bail out early
> when it finds mapped subpage.
>
> Suggested-by: Hugh Dickins <hughd@google.com>
> Acked-by: Hugh Dickins <hughd@google.com>
> Signed-off-by: Yang Shi <shy828301@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Thanks for the update, Yang Shi.
next prev parent reply other threads:[~2021-05-26 22:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-26 20:12 [v4 PATCH 1/2] mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split Yang Shi
2021-05-26 20:12 ` [v4 PATCH 2/2] mm: rmap: make try_to_unmap() void function Yang Shi
2021-05-26 22:29 ` Minchan Kim [this message]
2021-05-26 23:03 ` Shakeel Butt
2021-05-26 22:02 ` [v4 PATCH 1/2] mm: thp: replace DEBUG_VM BUG with VM_WARN when unmap fails for split Hugh Dickins
2021-05-27 10:52 ` Kirill A. Shutemov
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=YK7LykQE0LzysBYU@google.com \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=hughd@google.com \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=naoya.horiguchi@nec.com \
--cc=shy828301@gmail.com \
--cc=wangyugui@e16-tech.com \
--cc=ziy@nvidia.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.