diff for duplicates of <545988BE.3050201@cn.fujitsu.com> diff --git a/a/1.txt b/N1/1.txt index 5965aae..71adfec 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -25,3 +25,49 @@ Adding Liu Jiang... I think zone->managed_pages was introduced by Liu Jiang in the following patch: + +>From 9feedc9d831e18ae6d0d15aa562e5e46ba53647b Mon Sep 17 00:00:00 2001 +From: Jiang Liu <liuj97@gmail.com> +Date: Wed, 12 Dec 2012 13:52:12 -0800 +Subject: [PATCH 1/1] mm: introduce new field "managed_pages" to struct zone + +Before this patch, zone->present_pages meant "amount of memory +(excluding holes)", +not the zone has pages in buddy system. + +So I think zone->present_pages keeps its meaning as before. But it may +be abused +somewhere else, such as here. + +> I think there are several parts calculates parameters based on present_pages. +> +> I myself doesn't welcome having both of compliated "managed pages" and "present pages"... +> +> How about adding +> +> static inline int managed_zone(struct zone *zone) +> { +> return (!!zone->managed_pages); +> } +> +> for this bug fix ? + +Yes, adding this function could fix this problem. + +And by the way, we have the following code in onine_pages(): + +zone->present_pages += onlined_pages; + +pgdat_resize_lock(zone->zone_pgdat, &flags); +zone->zone_pgdat->node_present_pages += onlined_pages; +pgdat_resize_unlock(zone->zone_pgdat, &flags); + +We should do this when the zone size is changed, not where it is now. +Will send patches for this soon. + +Thanks. + +> +> Other parts, using present_pages, should be considered well. +> +> diff --git a/a/content_digest b/N1/content_digest index 72d42d9..20be446 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -5,31 +5,31 @@ "Subject\0Re: [PATCH 2/2] mem-hotplug: Fix wrong check for zone->pageset initialization in online_pages().\0" "Date\0Wed, 5 Nov 2014 10:17:34 +0800\0" "To\0Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>" - akpm@linux-foundation.org - santosh.shilimkar@ti.com - grygorii.strashko@ti.com - yinghai@kernel.org - isimatu.yasuaki@jp.fujitsu.co - fabf@skynet.be - nzimmer@sgi.com - wangnan0@huawei.com - vdavydov@parallels.com - toshi.kani@hp.com - phacht@linux.vnet.ibm.com - tj@kernel.org - kirill.shutemov@linux.intel.com - riel@redhat.com - luto@amacapital.net - hpa@linux.intel.com - aarcange@redhat.com - qiuxishi@huawei.com - mgorman@suse.de - rientjes@google.com - " hannes@cmpxchg.org\0" - "Cc\0linux-mm@kvack.org" - linux-kernel@vger.kernel.org + <akpm@linux-foundation.org> + <santosh.shilimkar@ti.com> + <grygorii.strashko@ti.com> + <yinghai@kernel.org> + <isimatu.yasuaki@jp.fujitsu.co> + <fabf@skynet.be> + <nzimmer@sgi.com> + <wangnan0@huawei.com> + <vdavydov@parallels.com> + <toshi.kani@hp.com> + <phacht@linux.vnet.ibm.com> + <tj@kernel.org> + <kirill.shutemov@linux.intel.com> + <riel@redhat.com> + <luto@amacapital.net> + <hpa@linux.intel.com> + <aarcange@redhat.com> + <qiuxishi@huawei.com> + <mgorman@suse.de> + <rientjes@google.com> + " <hannes@cmpxchg.org>\0" + "Cc\0<linux-mm@kvack.org>" + <linux-kernel@vger.kernel.org> Gu Zheng <guz.fnst@cn.fujitsu.com> - " jiang.liu@linux.intel.com\0" + " <jiang.liu@linux.intel.com>\0" "\00:1\0" "b\0" "On 11/05/2014 09:01 AM, Kamezawa Hiroyuki wrote:\n" @@ -58,6 +58,52 @@ "Adding Liu Jiang...\n" "\n" "I think zone->managed_pages was introduced by Liu Jiang in the following\n" - patch: + "patch:\n" + "\n" + ">From 9feedc9d831e18ae6d0d15aa562e5e46ba53647b Mon Sep 17 00:00:00 2001\n" + "From: Jiang Liu <liuj97@gmail.com>\n" + "Date: Wed, 12 Dec 2012 13:52:12 -0800\n" + "Subject: [PATCH 1/1] mm: introduce new field \"managed_pages\" to struct zone\n" + "\n" + "Before this patch, zone->present_pages meant \"amount of memory\n" + "(excluding holes)\",\n" + "not the zone has pages in buddy system.\n" + "\n" + "So I think zone->present_pages keeps its meaning as before. But it may\n" + "be abused\n" + "somewhere else, such as here.\n" + "\n" + "> I think there are several parts calculates parameters based on present_pages.\n" + ">\n" + "> I myself doesn't welcome having both of compliated \"managed pages\" and \"present pages\"...\n" + ">\n" + "> How about adding \n" + ">\n" + "> static inline int managed_zone(struct zone *zone)\n" + "> {\n" + "> \treturn (!!zone->managed_pages);\n" + "> }\n" + ">\n" + "> for this bug fix ?\n" + "\n" + "Yes, adding this function could fix this problem.\n" + "\n" + "And by the way, we have the following code in onine_pages():\n" + "\n" + "zone->present_pages += onlined_pages;\n" + "\n" + "pgdat_resize_lock(zone->zone_pgdat, &flags);\n" + "zone->zone_pgdat->node_present_pages += onlined_pages;\n" + "pgdat_resize_unlock(zone->zone_pgdat, &flags);\n" + "\n" + "We should do this when the zone size is changed, not where it is now.\n" + "Will send patches for this soon.\n" + "\n" + "Thanks.\n" + "\n" + ">\n" + "> Other parts, using present_pages, should be considered well.\n" + ">\n" + > -7972ed6f86bafd7f7c5e79b8fcbcfd6cdcb55a6140f826ac81bed1ac825922bf +4da57d2550f65d285a29c6ba4023e5049bd3f57ce606b8e232e7e0686d971802
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.