From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: "Kirill A. Shutemov" <kirill@shutemov.name>
Cc: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
Vladimir Davydov <vdavydov@virtuozzo.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper
Date: Tue, 24 Nov 2015 18:23:26 +0900 [thread overview]
Message-ID: <20151124092326.GC1254@swordfish> (raw)
In-Reply-To: <20151124090930.GB15712@node.shutemov.name>
On (11/24/15 11:09), Kirill A. Shutemov wrote:
[..]
> diff --git a/mm/page_idle.c b/mm/page_idle.c
> index 374931f32ebc..4ea9c4ef5146 100644
> --- a/mm/page_idle.c
> +++ b/mm/page_idle.c
> @@ -66,8 +66,12 @@ static int page_idle_clear_pte_refs_one(struct page *page,
> if (pte) {
> referenced = ptep_clear_young_notify(vma, addr, pte);
> pte_unmap(pte);
> - } else
> + } else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
> referenced = pmdp_clear_young_notify(vma, addr, pmd);
> + } else {
> + /* unexpected pmd-mapped page? */
> + WARN_ON_ONCE(1);
> + }
>
> spin_unlock(ptl);
>
> diff --git a/mm/rmap.c b/mm/rmap.c
> index 27916086ac50..499b24511b1f 100644
> --- a/mm/rmap.c
> +++ b/mm/rmap.c
> @@ -929,9 +929,12 @@ static int page_referenced_one(struct page *page, struct vm_area_struct *vma,
> referenced++;
> }
> pte_unmap(pte);
> - } else {
> + } else if (IS_ENABLED(CONFIG_TRANSPARENT_HUGEPAGE)) {
> if (pmdp_clear_flush_young_notify(vma, address, pmd))
> referenced++;
> + } else {
> + /* unexpected pmd-mapped page? */
> + WARN_ON_ONCE(1);
> }
> spin_unlock(ptl);
yes, works for me.
-ss
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2015-11-24 9:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-20 9:31 [PATCH -mm v2] mm: add page_check_address_transhuge helper Vladimir Davydov
2015-11-24 4:29 ` Sergey Senozhatsky
2015-11-24 9:09 ` Kirill A. Shutemov
2015-11-24 9:23 ` Sergey Senozhatsky [this message]
2015-11-24 9:36 ` Vladimir Davydov
2015-11-24 9:46 ` Vladimir Davydov
2015-11-24 10:09 ` Sergey Senozhatsky
2015-11-24 9:57 ` Kirill A. Shutemov
2015-11-24 18:15 ` Johannes Weiner
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=20151124092326.GC1254@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=vdavydov@virtuozzo.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;
as well as URLs for NNTP newsgroup(s).