From: Michal Nazarewicz <mina86@mina86.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>, Gioh Kim <gioh.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Mel Gorman <mgorman@suse.de>,
Laura Abbott <lauraa@codeaurora.org>,
Minchan Kim <minchan@kernel.org>,
Heesub Shin <heesub.shin@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used
Date: Sat, 31 May 2014 09:02:51 +0900 [thread overview]
Message-ID: <xa1tha46hl1w.fsf@mina86.com> (raw)
In-Reply-To: <20140530004514.GB8906@js1304-P5Q-DELUXE>
> On Thu, May 29, 2014 at 05:09:34PM +0900, Gioh Kim wrote:
>> Is IS_ENABLED(CONFIG_CMA) necessary?
>> What about if (migratetype == MIGRATE_MOVABLE && zone->managed_cma_pages) ?
On Fri, May 30 2014, Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
> Yes, field, managed_cma_pages exists only if CONFIG_CMA is enabled, so
> removing IS_ENABLE(CONFIG_CMA) would break the build.
That statement makes no sense. If zone->managed_cma_pages not being
defined is the problem, what you need is:
+#ifdef CONFIG_CMA
+ if (migratetype == MIGRATE_MOVABLE && zone->managed_cma_pages)
+ page = __rmqueue_cma(zone, order);
+#endif
If you use IS_ENABLED, zone-managed_cma_pages has to be defined
regardless of result of state of CONFIG_CMA.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--
--
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: Michal Nazarewicz <mina86@mina86.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>, Gioh Kim <gioh.kim@lge.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Mel Gorman <mgorman@suse.de>,
Laura Abbott <lauraa@codeaurora.org>,
Minchan Kim <minchan@kernel.org>,
Heesub Shin <heesub.shin@samsung.com>,
Marek Szyprowski <m.szyprowski@samsung.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used
Date: Sat, 31 May 2014 09:02:51 +0900 [thread overview]
Message-ID: <xa1tha46hl1w.fsf@mina86.com> (raw)
In-Reply-To: <20140530004514.GB8906@js1304-P5Q-DELUXE>
> On Thu, May 29, 2014 at 05:09:34PM +0900, Gioh Kim wrote:
>> Is IS_ENABLED(CONFIG_CMA) necessary?
>> What about if (migratetype == MIGRATE_MOVABLE && zone->managed_cma_pages) ?
On Fri, May 30 2014, Joonsoo Kim <iamjoonsoo.kim@lge.com> wrote:
> Yes, field, managed_cma_pages exists only if CONFIG_CMA is enabled, so
> removing IS_ENABLE(CONFIG_CMA) would break the build.
That statement makes no sense. If zone->managed_cma_pages not being
defined is the problem, what you need is:
+#ifdef CONFIG_CMA
+ if (migratetype == MIGRATE_MOVABLE && zone->managed_cma_pages)
+ page = __rmqueue_cma(zone, order);
+#endif
If you use IS_ENABLED, zone-managed_cma_pages has to be defined
regardless of result of state of CONFIG_CMA.
--
Best regards, _ _
.o. | Liege of Serenely Enlightened Majesty of o' \,=./ `o
..o | Computer Science, Michał “mina86” Nazarewicz (o o)
ooo +--<mpn@google.com>--<xmpp:mina86@jabber.org>--ooO--(_)--Ooo--
next prev parent reply other threads:[~2014-05-31 0:02 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-28 7:04 [PATCH v2 0/3] Aggressively allocate the pages on cma reserved memory Joonsoo Kim
2014-05-28 7:04 ` Joonsoo Kim
2014-05-28 7:04 ` [PATCH v2 1/3] CMA: remove redundant retrying code in __alloc_contig_migrate_range Joonsoo Kim
2014-05-28 7:04 ` Joonsoo Kim
2014-05-28 7:04 ` [PATCH v2 2/3] CMA: aggressively allocate the pages on cma reserved memory when not used Joonsoo Kim
2014-05-28 7:04 ` Joonsoo Kim
2014-05-29 7:24 ` Gioh Kim
2014-05-29 7:24 ` Gioh Kim
2014-05-29 7:48 ` Joonsoo Kim
2014-05-29 7:48 ` Joonsoo Kim
2014-05-29 8:09 ` Gioh Kim
2014-05-29 8:09 ` Gioh Kim
2014-05-30 0:45 ` Joonsoo Kim
2014-05-30 0:45 ` Joonsoo Kim
2014-05-31 0:02 ` Michal Nazarewicz [this message]
2014-05-31 0:02 ` Michal Nazarewicz
2014-06-02 6:17 ` Joonsoo Kim
2014-06-02 6:17 ` Joonsoo Kim
2014-05-30 7:53 ` Gioh Kim
2014-05-30 7:53 ` Gioh Kim
2014-05-30 14:23 ` Joonsoo Kim
2014-05-30 14:23 ` Joonsoo Kim
2014-06-02 5:54 ` Gioh Kim
2014-06-02 5:54 ` Gioh Kim
2014-06-02 6:23 ` Joonsoo Kim
2014-06-02 6:23 ` Joonsoo Kim
2014-06-02 7:13 ` Gioh Kim
2014-06-02 7:13 ` Gioh Kim
2014-05-31 0:11 ` Michal Nazarewicz
2014-05-31 0:11 ` Michal Nazarewicz
2014-10-30 10:37 ` Hui Zhu
2014-10-30 10:37 ` Hui Zhu
[not found] ` <CADtm3G5Cb2vzVo61qDJ7-1ZNzQ2zOisfjb7GiFXvZR0ocKZy0A@mail.gmail.com>
2015-01-06 4:01 ` Gregory Fong
2015-01-06 4:01 ` Gregory Fong
2015-01-06 8:23 ` Joonsoo Kim
2015-01-06 8:23 ` Joonsoo Kim
2014-05-28 7:04 ` [PATCH v2 3/3] CMA: always treat free cma pages as non-free on watermark checking Joonsoo Kim
2014-05-28 7:04 ` Joonsoo Kim
2014-05-30 10:40 ` Ritesh Harjani
2014-05-30 10:40 ` Ritesh Harjani
2014-05-30 14:46 ` Joonsoo Kim
2014-05-30 14:46 ` Joonsoo Kim
2014-06-02 4:07 ` Ritesh Harjani
2014-06-02 4:07 ` Ritesh Harjani
2014-06-02 10:47 ` Bartlomiej Zolnierkiewicz
2014-06-02 10:47 ` Bartlomiej Zolnierkiewicz
2014-06-02 14:05 ` Joonsoo Kim
2014-06-02 14:05 ` Joonsoo 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=xa1tha46hl1w.fsf@mina86.com \
--to=mina86@mina86.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=gioh.kim@lge.com \
--cc=hannes@cmpxchg.org \
--cc=heesub.shin@samsung.com \
--cc=iamjoonsoo.kim@lge.com \
--cc=lauraa@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@suse.de \
--cc=minchan@kernel.org \
--cc=riel@redhat.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.