All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes@cmpxchg.org>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.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 13:15:21 -0500	[thread overview]
Message-ID: <20151124181521.GA19885@cmpxchg.org> (raw)
In-Reply-To: <20151124093617.GE29014@esperanza>

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@cmpxchg.org>

--
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>

WARNING: multiple messages have this Message-ID (diff)
From: Johannes Weiner <hannes@cmpxchg.org>
To: Vladimir Davydov <vdavydov@virtuozzo.com>
Cc: "Kirill A. Shutemov" <kirill@shutemov.name>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.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 13:15:21 -0500	[thread overview]
Message-ID: <20151124181521.GA19885@cmpxchg.org> (raw)
In-Reply-To: <20151124093617.GE29014@esperanza>

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@cmpxchg.org>

  parent reply	other threads:[~2015-11-24 18:15 UTC|newest]

Thread overview: 18+ 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-20  9:31 ` Vladimir Davydov
2015-11-24  4:29 ` Sergey Senozhatsky
2015-11-24  4:29   ` Sergey Senozhatsky
2015-11-24  9:09   ` Kirill A. Shutemov
2015-11-24  9:09     ` Kirill A. Shutemov
2015-11-24  9:23     ` Sergey Senozhatsky
2015-11-24  9:23       ` Sergey Senozhatsky
2015-11-24  9:36     ` Vladimir Davydov
2015-11-24  9:36       ` Vladimir Davydov
2015-11-24  9:46       ` Vladimir Davydov
2015-11-24  9:46         ` Vladimir Davydov
2015-11-24 10:09         ` Sergey Senozhatsky
2015-11-24 10:09           ` Sergey Senozhatsky
2015-11-24  9:57       ` Kirill A. Shutemov
2015-11-24  9:57         ` Kirill A. Shutemov
2015-11-24 18:15       ` Johannes Weiner [this message]
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=20151124181521.GA19885@cmpxchg.org \
    --to=hannes@cmpxchg.org \
    --cc=akpm@linux-foundation.org \
    --cc=kirill@shutemov.name \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --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 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.