[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20151124181521.GA19885@cmpxchg.org>
Date: Tue, 24 Nov 2015 13:15:21 -0500
From: Johannes Weiner <hannes@...xchg.org>
To: Vladimir Davydov <vdavydov@...tuozzo.com>
Cc: "Kirill A. Shutemov" <kirill@...temov.name>,
Sergey Senozhatsky <sergey.senozhatsky.work@...il.com>,
Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH -mm v2] mm: add page_check_address_transhuge helper
On Tue, Nov 24, 2015 at 12:36:17PM +0300, Vladimir Davydov wrote:
> diff --git a/include/linux/rmap.h b/include/linux/rmap.h
> index b9eedc63e9e6..77d1ba57d495 100644
> --- a/include/linux/rmap.h
> +++ b/include/linux/rmap.h
> @@ -219,9 +219,20 @@ static inline pte_t *page_check_address(struct page *page, struct mm_struct *mm,
> * Used by idle page tracking to check if a page was referenced via page
> * tables.
> */
> +#ifdef CONFIG_TRANSPARENT_HUGEPAGE
> bool page_check_address_transhuge(struct page *page, struct mm_struct *mm,
> unsigned long address, pmd_t **pmdp,
> pte_t **ptep, spinlock_t **ptlp);
> +#else
> +static inline bool page_check_address_transhuge(struct page *page,
> + struct mm_struct *mm, unsigned long address,
> + pmd_t **pmdp, pte_t **ptep, spinlock_t **ptlp)
> +{
> + *ptep = page_check_address(page, mm, address, ptlp, 0);
> + *pmdp = NULL;
> + return !!*ptep;
> +}
> +#endif
Tested-by: Johannes Weiner <hannes@...xchg.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists