From: Minchan Kim <minchan@kernel.org>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: compare MIGRATE_ISOLATE selectively
Date: Fri, 21 Dec 2012 10:09:02 +0900 [thread overview]
Message-ID: <20121221010902.GD2686@blaptop> (raw)
In-Reply-To: <xa1tfw30hgfb.fsf@mina86.com>
On Thu, Dec 20, 2012 at 04:49:44PM +0100, Michal Nazarewicz wrote:
> 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 a??is_migrate_isolatea?? to match already existing a??is_migrate_cmaa???
Good poking. In fact, while I made this patch, I was very tempted by renaming
is_migrate_cma to cma_pageblock.
is_migrate_cma(mt)
I don't know who start to use "mt" instead of "migratetype" but anyway, it's
not a good idea.
is_migrate_cma(migratetype)
It's very clear for me because migratetype is per pageblock, we can know the
function works per pageblock unit.
> Especially as the a??mt_isolated_pageblocka?? sound confusing to me, it
> implies that it works on pageblocks which it does not.
-ENOPARSE.
migratetype works on pageblock.
I admit mt is really dirty but I used page_alloc.c already has lots of mt, SIGH.
How about this?
1. Let's change all "mt" with "migratetype" again.
2. use is_migrate_isolate and is_migrate_cma for "migratetype".
3. use is_migrate_isolate_page instead of page_isolated_pageblock for "page".
Okay?
>
> > +#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, MichaA? a??mina86a?? Nazarewicz (o o)
> ooo +----<email/xmpp: mpn@google.com>--------------ooO--(_)--Ooo--
--
Kind regards,
Minchan Kim
--
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: Minchan Kim <minchan@kernel.org>
To: Michal Nazarewicz <mina86@mina86.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: compare MIGRATE_ISOLATE selectively
Date: Fri, 21 Dec 2012 10:09:02 +0900 [thread overview]
Message-ID: <20121221010902.GD2686@blaptop> (raw)
In-Reply-To: <xa1tfw30hgfb.fsf@mina86.com>
On Thu, Dec 20, 2012 at 04:49:44PM +0100, Michal Nazarewicz wrote:
> 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”?
Good poking. In fact, while I made this patch, I was very tempted by renaming
is_migrate_cma to cma_pageblock.
is_migrate_cma(mt)
I don't know who start to use "mt" instead of "migratetype" but anyway, it's
not a good idea.
is_migrate_cma(migratetype)
It's very clear for me because migratetype is per pageblock, we can know the
function works per pageblock unit.
> Especially as the “mt_isolated_pageblock” sound confusing to me, it
> implies that it works on pageblocks which it does not.
-ENOPARSE.
migratetype works on pageblock.
I admit mt is really dirty but I used page_alloc.c already has lots of mt, SIGH.
How about this?
1. Let's change all "mt" with "migratetype" again.
2. use is_migrate_isolate and is_migrate_cma for "migratetype".
3. use is_migrate_isolate_page instead of page_isolated_pageblock for "page".
Okay?
>
> > +#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--
--
Kind regards,
Minchan Kim
next prev parent reply other threads:[~2012-12-21 1:09 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-20 5:25 [PATCH] mm: compare MIGRATE_ISOLATE selectively Minchan Kim
2012-12-20 5:25 ` Minchan Kim
2012-12-20 15:49 ` Michal Nazarewicz
2012-12-20 15:49 ` Michal Nazarewicz
2012-12-21 1:09 ` Minchan Kim [this message]
2012-12-21 1:09 ` Minchan Kim
2012-12-21 12:46 ` Michal Nazarewicz
2012-12-23 23:26 ` Minchan Kim
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=20121221010902.GD2686@blaptop \
--to=minchan@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mina86@mina86.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.