From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f71.google.com (mail-wm0-f71.google.com [74.125.82.71]) by kanga.kvack.org (Postfix) with ESMTP id 5F7156B025E for ; Fri, 5 Aug 2016 12:10:03 -0400 (EDT) Received: by mail-wm0-f71.google.com with SMTP id l4so20722304wml.0 for ; Fri, 05 Aug 2016 09:10:03 -0700 (PDT) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com. [148.163.158.5]) by mx.google.com with ESMTPS id w10si17215920wjg.143.2016.08.05.00.24.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Aug 2016 00:24:59 -0700 (PDT) Received: from pps.filterd (m0098419.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.11/8.16.0.11) with SMTP id u757JWtu085277 for ; Fri, 5 Aug 2016 03:24:57 -0400 Received: from e28smtp03.in.ibm.com (e28smtp03.in.ibm.com [125.16.236.3]) by mx0b-001b2d01.pphosted.com with ESMTP id 24kxmjj321-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Fri, 05 Aug 2016 03:24:57 -0400 Received: from localhost by e28smtp03.in.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Fri, 5 Aug 2016 12:54:54 +0530 Received: from d28relay09.in.ibm.com (d28relay09.in.ibm.com [9.184.220.160]) by d28dlp02.in.ibm.com (Postfix) with ESMTP id B12703940060 for ; Fri, 5 Aug 2016 12:54:52 +0530 (IST) Received: from d28av01.in.ibm.com (d28av01.in.ibm.com [9.184.220.63]) by d28relay09.in.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id u757OqS135979400 for ; Fri, 5 Aug 2016 12:54:52 +0530 Received: from d28av01.in.ibm.com (localhost [127.0.0.1]) by d28av01.in.ibm.com (8.14.4/8.14.4/NCO v10.0 AVout) with ESMTP id u757Opxc028688 for ; Fri, 5 Aug 2016 12:54:52 +0530 Date: Fri, 5 Aug 2016 12:54:50 +0530 From: Srikar Dronamraju Subject: Re: [PATCH V2 1/2] mm/page_alloc: Replace set_dma_reserve to set_memory_reserve Reply-To: Srikar Dronamraju References: <1470330729-6273-1-git-send-email-srikar@linux.vnet.ibm.com> <09d5b30e-5956-bf64-5f4c-ea5425d7f7a5@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <09d5b30e-5956-bf64-5f4c-ea5425d7f7a5@suse.cz> Message-Id: <20160805072450.GE11268@linux.vnet.ibm.com> Sender: owner-linux-mm@kvack.org List-ID: To: Vlastimil Babka Cc: linux-mm@kvack.org, Mel Gorman , Michal Hocko , Andrew Morton , Michael Ellerman , linuxppc-dev@lists.ozlabs.org, Mahesh Salgaonkar , Hari Bathini , Dave Hansen , Balbir Singh * Vlastimil Babka [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: email@kvack.org