From: Peter Xu <peterx@redhat.com>
To: Mike Kravetz <mike.kravetz@oracle.com>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
linux-s390@vger.kernel.org, shu wang <malate_wangshu@hotmail.com>,
Axel Rasmussen <axelrasmussen@google.com>,
Andrea Arcangeli <aarcange@redhat.com>,
Heiko Carstens <hca@linux.ibm.com>,
Alexey Dobriyan <adobriyan@gmail.com>,
Matthew Wilcox <willy@infradead.org>,
Michel Lespinasse <walken@google.com>,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [RFC PATCH 3/5] mm proc/task_mmu.c: add soft dirty pte checks for hugetlb
Date: Wed, 17 Feb 2021 14:35:50 -0500 [thread overview]
Message-ID: <20210217193550.GC6519@xz-x1> (raw)
In-Reply-To: <20210211000322.159437-4-mike.kravetz@oracle.com>
On Wed, Feb 10, 2021 at 04:03:20PM -0800, Mike Kravetz wrote:
> Pagemap was only using the vma flag PM_SOFT_DIRTY for hugetlb vmas.
> This is insufficient. Check the individual pte entries.
>
> Signed-off-by: Mike Kravetz <mike.kravetz@oracle.com>
> ---
> fs/proc/task_mmu.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
> index 602e3a52884d..829b35016aaa 100644
> --- a/fs/proc/task_mmu.c
> +++ b/fs/proc/task_mmu.c
> @@ -1507,6 +1507,10 @@ static int pagemap_hugetlb_range(pte_t *ptep, unsigned long hmask,
> flags |= PM_SOFT_DIRTY;
>
> pte = huge_ptep_get(ptep);
> +
> + if (huge_pte_soft_dirty(pte))
> + flags |= PM_SOFT_DIRTY;
Should this be put into pte_present() chunk below? Since I feel like we'd need
huge_pte_swp_soft_dirty() for !pte_present(). Say, _PAGE_SOFT_DIRTY and
_PAGE_SWP_SOFT_DIRTY can be different.
> +
> if (pte_present(pte)) {
> struct page *page = pte_page(pte);
>
> --
> 2.29.2
>
--
Peter Xu
next prev parent reply other threads:[~2021-02-17 19:37 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-02-11 0:03 [RFC PATCH 0/5] Add hugetlb soft dirty support Mike Kravetz
2021-02-11 0:03 ` [RFC PATCH 1/5] hugetlb: add hugetlb helpers for " Mike Kravetz
2021-02-17 16:24 ` Peter Xu
2021-02-18 22:58 ` Mike Kravetz
2021-02-24 16:46 ` Gerald Schaefer
2021-02-24 16:55 ` Gerald Schaefer
2021-02-11 0:03 ` [RFC PATCH 2/5] hugetlb: enhance hugetlb fault processing to support soft dirty Mike Kravetz
2021-02-17 19:32 ` Peter Xu
2021-02-18 23:26 ` Mike Kravetz
2021-02-11 0:03 ` [RFC PATCH 3/5] mm proc/task_mmu.c: add soft dirty pte checks for hugetlb Mike Kravetz
2021-02-17 19:35 ` Peter Xu [this message]
2021-02-18 23:59 ` Mike Kravetz
2021-02-11 0:03 ` [RFC PATCH 4/5] hugetlb: don't permit pmd sharing if soft dirty in use Mike Kravetz
2021-02-17 19:44 ` Peter Xu
2021-02-11 0:03 ` [RFC PATCH 5/5] mm proc/task_mmu.c: add hugetlb specific routine for clear_refs Mike Kravetz
2021-02-17 20:25 ` Peter Xu
2021-02-19 0:14 ` Mike Kravetz
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=20210217193550.GC6519@xz-x1 \
--to=peterx@redhat.com \
--cc=aarcange@redhat.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=axelrasmussen@google.com \
--cc=hca@linux.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-s390@vger.kernel.org \
--cc=malate_wangshu@hotmail.com \
--cc=mike.kravetz@oracle.com \
--cc=walken@google.com \
--cc=willy@infradead.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 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.