From: "Michal Nazarewicz" <mina86@mina86.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>, Mel Gorman <mel@csn.ul.ie>
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-media@vger.kernel.org, linux-mm@kvack.org,
linaro-mm-sig@lists.linaro.org,
Kyungmin Park <kyungmin.park@samsung.com>,
Russell King <linux@arm.linux.org.uk>,
Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Ankita Garg <ankita@in.ibm.com>,
Daniel Walker <dwalker@codeaurora.org>,
Arnd Bergmann <arnd@arndb.de>,
Jesse Barker <jesse.barker@linaro.org>,
Jonathan Corbet <corbet@lwn.net>,
Shariq Hasnain <shariq.hasnain@linaro.org>,
Chunsang Jeong <chunsang.jeong@linaro.org>,
Dave Hansen <dave@linux.vnet.ibm.com>
Subject: Re: [PATCH 04/11] mm: compaction: export some of the functions
Date: Mon, 12 Dec 2011 15:41:04 +0100 [thread overview]
Message-ID: <op.v6dseqji3l0zgt@mpn-glaptop> (raw)
In-Reply-To: <20111212142906.GE3277@csn.ul.ie>
On Mon, 12 Dec 2011 15:29:07 +0100, Mel Gorman <mel@csn.ul.ie> wrote:
> On Fri, Nov 18, 2011 at 05:43:11PM +0100, Marek Szyprowski wrote:
>> From: Michal Nazarewicz <mina86@mina86.com>
>>
>> This commit exports some of the functions from compaction.c file
>> outside of it adding their declaration into internal.h header
>> file so that other mm related code can use them.
>>
>> This forced compaction.c to always be compiled (as opposed to being
>> compiled only if CONFIG_COMPACTION is defined) but as to avoid
>> introducing code that user did not ask for, part of the compaction.c
>> is now wrapped in on #ifdef.
>>
>> Signed-off-by: Michal Nazarewicz <mina86@mina86.com>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> mm/Makefile | 3 +-
>> mm/compaction.c | 112 +++++++++++++++++++++++--------------------------------
>> mm/internal.h | 35 +++++++++++++++++
>> 3 files changed, 83 insertions(+), 67 deletions(-)
>>
>> diff --git a/mm/Makefile b/mm/Makefile
>> index 50ec00e..24ed801 100644
>> --- a/mm/Makefile
>> +++ b/mm/Makefile
>> @@ -13,7 +13,7 @@ obj-y := filemap.o mempool.o oom_kill.o fadvise.o \
>> readahead.o swap.o truncate.o vmscan.o shmem.o \
>> prio_tree.o util.o mmzone.o vmstat.o backing-dev.o \
>> page_isolation.o mm_init.o mmu_context.o percpu.o \
>> - $(mmu-y)
>> + $(mmu-y) compaction.o
>
> That should be
>
> compaction.o $(mmu-y)
>
> for consistency.
>
> Overall, this patch implies that CMA is always compiled in.
Not really. But yes, it produces some bloat when neither CMA nor
compaction are compiled. I assume that linker will be able to deal
with that (since the functions are not EXPORT_SYMBOL'ed).
Note also that the was majority of compaction.c is #ifdef'd though
so only a handful of functions are compiled.
> Why not just make CMA depend on COMPACTION to keep things simplier?
I could imagine that someone would want to have CMA but not compaction,
hence I decided to give that choice.
> For example, if you enable CMA and do not enable COMPACTION, you
> lose things like the vmstat counters that can aid debugging. In
> fact, as parts of compaction.c are using defines like COMPACTBLOCKS,
> I'm not even sure compaction.c can compile without CONFIG_COMPACTION
> because of the vmstat stuff.
--
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--
--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-12-12 14:41 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-18 16:43 [PATCHv17 0/11] Contiguous Memory Allocator Marek Szyprowski
2011-11-18 16:43 ` [PATCH 01/11] mm: page_alloc: handle MIGRATE_ISOLATE in free_pcppages_bulk() Marek Szyprowski
2011-12-12 13:42 ` Mel Gorman
2011-12-12 14:23 ` Michal Nazarewicz
2011-12-12 14:42 ` Mel Gorman
2011-11-18 16:43 ` [PATCH 02/11] mm: compaction: introduce isolate_{free,migrate}pages_range() Marek Szyprowski
2011-12-12 14:07 ` Mel Gorman
2011-12-12 15:22 ` Michal Nazarewicz
2011-12-12 16:30 ` Mel Gorman
2011-12-12 16:46 ` Michal Nazarewicz
2011-12-12 17:20 ` Mel Gorman
2011-11-18 16:43 ` [PATCH 03/11] mm: mmzone: introduce zone_pfn_same_memmap() Marek Szyprowski
2011-12-12 14:19 ` Mel Gorman
2011-12-12 14:35 ` Michal Nazarewicz
2011-12-12 14:40 ` Mel Gorman
2011-12-12 14:51 ` Michal Nazarewicz
2011-12-12 15:51 ` Mel Gorman
2011-11-18 16:43 ` [PATCH 04/11] mm: compaction: export some of the functions Marek Szyprowski
2011-12-12 14:29 ` Mel Gorman
2011-12-12 14:41 ` Michal Nazarewicz [this message]
2011-12-12 15:40 ` Mel Gorman
2011-12-12 15:46 ` Michal Nazarewicz
2011-12-12 16:22 ` Arnd Bergmann
2011-11-18 16:43 ` [PATCH 05/11] mm: page_alloc: introduce alloc_contig_range() Marek Szyprowski
2011-11-18 16:43 ` [PATCH 06/11] mm: mmzone: MIGRATE_CMA migration type added Marek Szyprowski
2011-11-18 16:43 ` [PATCH 07/11] mm: page_isolation: MIGRATE_CMA isolation functions added Marek Szyprowski
2011-11-18 16:43 ` [PATCH 08/11] drivers: add Contiguous Memory Allocator Marek Szyprowski
2011-11-18 16:43 ` [PATCH 09/11] X86: integrate CMA with DMA-mapping subsystem Marek Szyprowski
2011-11-18 16:43 ` [PATCH 10/11] ARM: " Marek Szyprowski
2011-11-18 16:43 ` [PATCH 11/11] ARM: Samsung: use CMA for 2 memory banks for s5p-mfc device Marek Szyprowski
2011-11-18 21:20 ` [Linaro-mm-sig] [PATCHv17 0/11] Contiguous Memory Allocator sandeep patil
2011-11-18 21:26 ` Michal Nazarewicz
2011-11-18 23:30 ` sandeep patil
2011-11-19 18:09 ` Michal Nazarewicz
2011-11-25 16:43 ` [PATCH] mm: cma: hack/workaround for some allocation issues Marek Szyprowski
2011-11-25 21:08 ` Michal Nazarewicz
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=op.v6dseqji3l0zgt@mpn-glaptop \
--to=mina86@mina86.com \
--cc=akpm@linux-foundation.org \
--cc=ankita@in.ibm.com \
--cc=arnd@arndb.de \
--cc=chunsang.jeong@linaro.org \
--cc=corbet@lwn.net \
--cc=dave@linux.vnet.ibm.com \
--cc=dwalker@codeaurora.org \
--cc=jesse.barker@linaro.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kyungmin.park@samsung.com \
--cc=linaro-mm-sig@lists.linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux@arm.linux.org.uk \
--cc=m.szyprowski@samsung.com \
--cc=mel@csn.ul.ie \
--cc=shariq.hasnain@linaro.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