From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Rui Teng <rui.teng@linux.vnet.ibm.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Rik van Riel <riel@redhat.com>,
Johannes Weiner <hannes@cmpxchg.org>,
mgorman@techsingularity.net, Laura Abbott <lauraa@codeaurora.org>,
Minchan Kim <minchan@kernel.org>,
Marek Szyprowski <m.szyprowski@samsung.com>,
Michal Nazarewicz <mina86@mina86.com>,
"Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>,
Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/6] mm/page_alloc: recalculate some of zone threshold when on/offline memory
Date: Fri, 29 Apr 2016 15:57:12 +0900 [thread overview]
Message-ID: <20160429065712.GB19896@js1304-P5Q-DELUXE> (raw)
In-Reply-To: <bc9e4751-c953-35bf-4fb7-eae3885d3d07@linux.vnet.ibm.com>
On Thu, Apr 28, 2016 at 03:46:33PM +0800, Rui Teng wrote:
> On 4/25/16 1:21 PM, js1304@gmail.com wrote:
> >From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >
> >Some of zone threshold depends on number of managed pages in the zone.
> >When memory is going on/offline, it can be changed and we need to
> >adjust them.
> >
> >This patch add recalculation to appropriate places and clean-up
> >related function for better maintanance.
> >
> >Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> >---
> > mm/page_alloc.c | 36 +++++++++++++++++++++++++++++-------
> > 1 file changed, 29 insertions(+), 7 deletions(-)
> >
> >diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> >index 71fa015..ffa93e0 100644
> >--- a/mm/page_alloc.c
> >+++ b/mm/page_alloc.c
> >@@ -4633,6 +4633,8 @@ int local_memory_node(int node)
> > }
> > #endif
> >
> >+static void setup_min_unmapped_ratio(struct zone *zone);
> >+static void setup_min_slab_ratio(struct zone *zone);
> > #else /* CONFIG_NUMA */
> >
> > static void set_zonelist_order(void)
> >@@ -5747,9 +5749,8 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat)
> > zone->managed_pages = is_highmem_idx(j) ? realsize : freesize;
> > #ifdef CONFIG_NUMA
> > zone->node = nid;
> >- zone->min_unmapped_pages = (freesize*sysctl_min_unmapped_ratio)
> >- / 100;
> >- zone->min_slab_pages = (freesize * sysctl_min_slab_ratio) / 100;
> >+ setup_min_unmapped_ratio(zone);
> >+ setup_min_slab_ratio(zone);
>
> The original logic use freesize to calculate the
> zone->min_unmapped_pages and zone->min_slab_pages here.
> But the new function will use zone->managed_pages.
> Do you mean the original logic is wrong, or the managed_pages will
> always be freesize when CONFIG_NUMA defined?
managed_pages will always be freesize so no problem.
Thanks.
--
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-04-29 6:57 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 5:21 [PATCH v2 0/6] Introduce ZONE_CMA js1304
2016-04-25 5:21 ` [PATCH v2 1/6] mm/page_alloc: recalculate some of zone threshold when on/offline memory js1304
2016-04-28 7:46 ` Rui Teng
2016-04-29 6:57 ` Joonsoo Kim [this message]
2016-04-25 5:21 ` [PATCH v2 2/6] mm/cma: introduce new zone, ZONE_CMA js1304
2016-04-26 9:38 ` Rui Teng
2016-04-29 7:04 ` Joonsoo Kim
2016-04-25 5:21 ` [PATCH v2 3/6] mm/cma: populate ZONE_CMA js1304
2016-04-25 5:21 ` [PATCH v2 4/6] mm/cma: remove ALLOC_CMA js1304
2016-04-25 5:21 ` [PATCH v2 5/6] mm/cma: remove MIGRATE_CMA js1304
2016-04-25 5:21 ` [PATCH v2 6/6] mm/cma: remove per zone CMA stat js1304
2016-04-25 5:36 ` [PATCH v2 0/6] Introduce ZONE_CMA Joonsoo Kim
2016-04-28 10:39 ` Mel Gorman
2016-04-29 6:51 ` Joonsoo Kim
2016-04-29 9:29 ` Mel Gorman
2016-05-02 6:14 ` Joonsoo Kim
2016-05-02 7:49 ` Vlastimil Babka
2016-05-03 1:29 ` 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=20160429065712.GB19896@js1304-P5Q-DELUXE \
--to=iamjoonsoo.kim@lge.com \
--cc=akpm@linux-foundation.org \
--cc=aneesh.kumar@linux.vnet.ibm.com \
--cc=hannes@cmpxchg.org \
--cc=lauraa@codeaurora.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=m.szyprowski@samsung.com \
--cc=mgorman@techsingularity.net \
--cc=mina86@mina86.com \
--cc=minchan@kernel.org \
--cc=riel@redhat.com \
--cc=rui.teng@linux.vnet.ibm.com \
--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