Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1276190
| From | Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper |
| Date | 2015-11-24 10:30 +0100 |
| Message-ID | <qyi5d-6fp-21@gated-at.bofh.it> (permalink) |
| References | <qwQkG-5nF-25@gated-at.bofh.it> <qydoS-3c2-13@gated-at.bofh.it> <qyhLP-67Y-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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 from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH -mm v2] mm: add page_check_address_transhuge helper Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-20 10:40 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-24 05:30 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-24 10:10 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-24 10:30 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-24 10:40 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper Vladimir Davydov <vdavydov@virtuozzo.com> - 2015-11-24 10:50 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2015-11-24 11:10 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper "Kirill A. Shutemov" <kirill@shutemov.name> - 2015-11-24 11:00 +0100
Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper Johannes Weiner <hannes@cmpxchg.org> - 2015-11-24 19:20 +0100
csiph-web