From: Srikar Dronamraju <srikar@linux.vnet.ibm.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: linux-mm@kvack.org, Mel Gorman <mgorman@techsingularity.net>,
Michal Hocko <mhocko@kernel.org>,
Andrew Morton <akpm@linux-foundation.org>,
Michael Ellerman <mpe@ellerman.id.au>,
linuxppc-dev@lists.ozlabs.org,
Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>,
Hari Bathini <hbathini@linux.vnet.ibm.com>,
Dave Hansen <dave.hansen@intel.com>,
Balbir Singh <bsingharora@gmail.com>
Subject: Re: [PATCH V2 1/2] mm/page_alloc: Replace set_dma_reserve to set_memory_reserve
Date: Fri, 5 Aug 2016 12:54:50 +0530 [thread overview]
Message-ID: <20160805072450.GE11268@linux.vnet.ibm.com> (raw)
In-Reply-To: <09d5b30e-5956-bf64-5f4c-ea5425d7f7a5@suse.cz>
* Vlastimil Babka <vbabka@suse.cz> [2016-08-05 08:45:03]:
> >@@ -5493,10 +5493,10 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat)
> > }
> >
> > /* Account for reserved pages */
> >- if (j == 0 && freesize > dma_reserve) {
> >- freesize -= dma_reserve;
> >+ if (j == 0 && freesize > nr_memory_reserve) {
>
> Will this really work (together with patch 2) as intended?
> This j == 0 means that we are doing this only for the first zone, which is
> ZONE_DMA (or ZONE_DMA32) on node 0 on many systems. I.e. I don't think it's
> really true that "dma_reserve has nothing to do with DMA or ZONE_DMA".
>
> This zone will have limited amount of memory, so the "freesize >
> nr_memory_reserve" will easily be false once you set this to many gigabytes,
> so in fact nothing will get subtracted.
>
> On the other hand if the kernel has both CONFIG_ZONE_DMA and
> CONFIG_ZONE_DMA32 disabled, then j == 0 will be true for ZONE_NORMAL. This
> zone might be present on multiple nodes (unless they are configured as
> movable) and then the value intended to be global will be subtracted from
> several nodes.
>
> I don't know what's the exact ppc64 situation here, perhaps there are indeed
> no DMA/DMA32 zones, and the fadump kernel only uses one node, so it works in
> the end, but it doesn't seem much robust to me?
>
At the page initialization time, powerpc seems to have just one zone
spread across the 16 nodes.
>From the dmesg.
[ 0.000000] Memory hole size: 0MB
[ 0.000000] Zone ranges:
[ 0.000000] DMA [mem 0x0000000000000000-0x00001f5c8fffffff]
[ 0.000000] DMA32 empty
[ 0.000000] Normal empty
[ 0.000000] Movable zone start for each node
[ 0.000000] Early memory node ranges
[ 0.000000] node 0: [mem 0x0000000000000000-0x000001fb4fffffff]
[ 0.000000] node 1: [mem 0x000001fb50000000-0x000003fa8fffffff]
[ 0.000000] node 2: [mem 0x000003fa90000000-0x000005f9cfffffff]
[ 0.000000] node 3: [mem 0x000005f9d0000000-0x000007f8efffffff]
[ 0.000000] node 4: [mem 0x000007f8f0000000-0x000009f81fffffff]
[ 0.000000] node 5: [mem 0x000009f820000000-0x00000bf77fffffff]
[ 0.000000] node 6: [mem 0x00000bf780000000-0x00000df6dfffffff]
[ 0.000000] node 7: [mem 0x00000df6e0000000-0x00000ff63fffffff]
[ 0.000000] node 8: [mem 0x00000ff640000000-0x000011f58fffffff]
[ 0.000000] node 9: [mem 0x000011f590000000-0x000013644fffffff]
[ 0.000000] node 10: [mem 0x0000136450000000-0x00001563afffffff]
[ 0.000000] node 11: [mem 0x00001563b0000000-0x000017630fffffff]
[ 0.000000] node 12: [mem 0x0000176310000000-0x000019625fffffff]
[ 0.000000] node 13: [mem 0x0000196260000000-0x00001b5dcfffffff]
[ 0.000000] node 14: [mem 0x00001b5dd0000000-0x00001d5d2fffffff]
[ 0.000000] node 15: [mem 0x00001d5d30000000-0x00001f5c8fffffff]
The config has the below.
CONFIG_ZONE_DMA32=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_ZONE_DMA_FLAG=1
CONFIG_FORCE_MAX_ZONEORDER=9
CONFIG_ZONE_DMA=y
I tried forcing CONFIG_ZONE_DMA to be not set, but make always pick it.
>From source arch/powerpc/Kconfig marks CONFIG_ZONE_DMA as "default y"
--
Thanks and Regards
Srikar Dronamraju
--
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>
next prev parent reply other threads:[~2016-08-05 16:10 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-04 17:12 [PATCH V2 1/2] mm/page_alloc: Replace set_dma_reserve to set_memory_reserve Srikar Dronamraju
2016-08-04 17:12 ` [PATCH V2 2/2] fadump: Register the memory reserved by fadump Srikar Dronamraju
2016-08-04 21:01 ` Andrew Morton
2016-08-29 13:12 ` Srikar Dronamraju
2016-08-05 6:45 ` [PATCH V2 1/2] mm/page_alloc: Replace set_dma_reserve to set_memory_reserve Vlastimil Babka
2016-08-05 7:24 ` Srikar Dronamraju [this message]
2016-08-05 9:09 ` Vlastimil Babka
2016-08-05 6:47 ` Mel Gorman
2016-08-05 7:36 ` Srikar Dronamraju
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=20160805072450.GE11268@linux.vnet.ibm.com \
--to=srikar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=bsingharora@gmail.com \
--cc=dave.hansen@intel.com \
--cc=hbathini@linux.vnet.ibm.com \
--cc=linux-mm@kvack.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mahesh@linux.vnet.ibm.com \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=mpe@ellerman.id.au \
--cc=vbabka@suse.cz \
/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;
as well as URLs for NNTP newsgroup(s).