linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Nazarewicz <mina86@mina86.com>
To: Minchan Kim <minchan@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: compare MIGRATE_ISOLATE selectively
Date: Thu, 20 Dec 2012 16:49:44 +0100	[thread overview]
Message-ID: <xa1tfw30hgfb.fsf@mina86.com> (raw)
In-Reply-To: <1355981152-2505-1-git-send-email-minchan@kernel.org>

[-- Attachment #1: Type: text/plain, Size: 1438 bytes --]

On Thu, Dec 20 2012, Minchan Kim wrote:
> diff --git a/include/linux/page-isolation.h b/include/linux/page-isolation.h
> index a92061e..4ada4ef 100644
> --- a/include/linux/page-isolation.h
> +++ b/include/linux/page-isolation.h
> @@ -1,6 +1,25 @@
>  #ifndef __LINUX_PAGEISOLATION_H
>  #define __LINUX_PAGEISOLATION_H
>  
> +#ifdef CONFIG_MEMORY_ISOLATION
> +static inline bool page_isolated_pageblock(struct page *page)
> +{
> +	return get_pageblock_migratetype(page) == MIGRATE_ISOLATE;
> +}
> +static inline bool mt_isolated_pageblock(int migratetype)
> +{
> +	return migratetype == MIGRATE_ISOLATE;
> +}

Perhaps “is_migrate_isolate” to match already existing “is_migrate_cma”?
Especially as the “mt_isolated_pageblock” sound confusing to me, it
implies that it works on pageblocks which it does not.

> +#else
> +static inline bool page_isolated_pageblock(struct page *page)
> +{
> +	return false;
> +}
> +static inline bool mt_isolated_pageblock(int migratetype)
> +{
> +	return false;
> +}
> +#endif
>  
>  bool has_unmovable_pages(struct zone *zone, struct page *page, int count,
>  			 bool skip_hwpoisoned_pages);
-- 
Best regards,                                         _     _
.o. | Liege of Serenely Enlightened Majesty of      o' \,=./ `o
..o | Computer Science,  Michał “mina86” Nazarewicz    (o o)
ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--

[-- Attachment #2.1: Type: text/plain, Size: 0 bytes --]



[-- Attachment #2.2: Type: application/pgp-signature, Size: 835 bytes --]

  reply	other threads:[~2012-12-20 15:49 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-20  5:25 Minchan Kim
2012-12-20 15:49 ` Michal Nazarewicz [this message]
2012-12-21  1:09   ` Minchan Kim
2012-12-21 12:46     ` Michal Nazarewicz
2012-12-23 23:26       ` Minchan Kim

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=xa1tfw30hgfb.fsf@mina86.com \
    --to=mina86@mina86.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox