From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: js1304@gmail.com, Andrew Morton <akpm@linux-foundation.org>
Cc: 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>,
Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v5 1/6] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request
Date: Fri, 16 Sep 2016 08:44:17 +0530 [thread overview]
Message-ID: <87sht0y1rq.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1472447255-10584-2-git-send-email-iamjoonsoo.kim@lge.com>
js1304@gmail.com writes:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that
> important to reserve. When ZONE_MOVABLE is used, this problem would
> theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE
> allocation request which is mainly used for page cache and anon page
> allocation. So, fix it.
>
> And, defining sysctl_lowmem_reserve_ratio array by MAX_NR_ZONES - 1 size
> makes code complex. For example, if there is highmem system, following
> reserve ratio is activated for *NORMAL ZONE* which would be easyily
> misleading people.
>
> #ifdef CONFIG_HIGHMEM
> 32
> #endif
>
> This patch also fix this situation by defining sysctl_lowmem_reserve_ratio
> array by MAX_NR_ZONES and place "#ifdef" to right place.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> ---
> include/linux/mmzone.h | 2 +-
> mm/page_alloc.c | 7 ++++---
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index d572b78..e3f39af 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -877,7 +877,7 @@ int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> int watermark_scale_factor_sysctl_handler(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> -extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
> +extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
> int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 4f7d5d7..a8310de 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -198,17 +198,18 @@ static void __free_pages_ok(struct page *page, unsigned int order);
> * TBD: should special case ZONE_DMA32 machines here - in those we normally
> * don't need any ZONE_NORMAL reservation
> */
> -int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
> +int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES] = {
> #ifdef CONFIG_ZONE_DMA
> 256,
> #endif
> #ifdef CONFIG_ZONE_DMA32
> 256,
> #endif
> -#ifdef CONFIG_HIGHMEM
> 32,
> +#ifdef CONFIG_HIGHMEM
> + INT_MAX,
> #endif
> - 32,
> + INT_MAX,
> };
>
> EXPORT_SYMBOL(totalram_pages);
> --
> 1.9.1
We can also do things like below to make it readable ?
#ifdef CONFIG_ZONE_DMA
[ZONE_DMA] = 256,
#endif
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
--
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>
WARNING: multiple messages have this Message-ID (diff)
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
To: js1304@gmail.com, Andrew Morton <akpm@linux-foundation.org>
Cc: 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>,
Vlastimil Babka <vbabka@suse.cz>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Joonsoo Kim <iamjoonsoo.kim@lge.com>
Subject: Re: [PATCH v5 1/6] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request
Date: Fri, 16 Sep 2016 08:44:17 +0530 [thread overview]
Message-ID: <87sht0y1rq.fsf@linux.vnet.ibm.com> (raw)
In-Reply-To: <1472447255-10584-2-git-send-email-iamjoonsoo.kim@lge.com>
js1304@gmail.com writes:
> From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
>
> Freepage on ZONE_HIGHMEM doesn't work for kernel memory so it's not that
> important to reserve. When ZONE_MOVABLE is used, this problem would
> theorectically cause to decrease usable memory for GFP_HIGHUSER_MOVABLE
> allocation request which is mainly used for page cache and anon page
> allocation. So, fix it.
>
> And, defining sysctl_lowmem_reserve_ratio array by MAX_NR_ZONES - 1 size
> makes code complex. For example, if there is highmem system, following
> reserve ratio is activated for *NORMAL ZONE* which would be easyily
> misleading people.
>
> #ifdef CONFIG_HIGHMEM
> 32
> #endif
>
> This patch also fix this situation by defining sysctl_lowmem_reserve_ratio
> array by MAX_NR_ZONES and place "#ifdef" to right place.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
> ---
> include/linux/mmzone.h | 2 +-
> mm/page_alloc.c | 7 ++++---
> 2 files changed, 5 insertions(+), 4 deletions(-)
>
> diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
> index d572b78..e3f39af 100644
> --- a/include/linux/mmzone.h
> +++ b/include/linux/mmzone.h
> @@ -877,7 +877,7 @@ int min_free_kbytes_sysctl_handler(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> int watermark_scale_factor_sysctl_handler(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> -extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1];
> +extern int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES];
> int lowmem_reserve_ratio_sysctl_handler(struct ctl_table *, int,
> void __user *, size_t *, loff_t *);
> int percpu_pagelist_fraction_sysctl_handler(struct ctl_table *, int,
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index 4f7d5d7..a8310de 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -198,17 +198,18 @@ static void __free_pages_ok(struct page *page, unsigned int order);
> * TBD: should special case ZONE_DMA32 machines here - in those we normally
> * don't need any ZONE_NORMAL reservation
> */
> -int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES-1] = {
> +int sysctl_lowmem_reserve_ratio[MAX_NR_ZONES] = {
> #ifdef CONFIG_ZONE_DMA
> 256,
> #endif
> #ifdef CONFIG_ZONE_DMA32
> 256,
> #endif
> -#ifdef CONFIG_HIGHMEM
> 32,
> +#ifdef CONFIG_HIGHMEM
> + INT_MAX,
> #endif
> - 32,
> + INT_MAX,
> };
>
> EXPORT_SYMBOL(totalram_pages);
> --
> 1.9.1
We can also do things like below to make it readable ?
#ifdef CONFIG_ZONE_DMA
[ZONE_DMA] = 256,
#endif
Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
next prev parent reply other threads:[~2016-09-16 3:14 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-29 5:07 [PATCH v5 0/6] Introduce ZONE_CMA js1304
2016-08-29 5:07 ` js1304
2016-08-29 5:07 ` [PATCH v5 1/6] mm/page_alloc: don't reserve ZONE_HIGHMEM for ZONE_MOVABLE request js1304
2016-08-29 5:07 ` js1304
2016-09-16 3:14 ` Aneesh Kumar K.V [this message]
2016-09-16 3:14 ` Aneesh Kumar K.V
2016-09-22 5:30 ` Joonsoo Kim
2016-09-22 5:30 ` Joonsoo Kim
2016-09-21 9:06 ` Vlastimil Babka
2016-09-21 9:06 ` Vlastimil Babka
2016-08-29 5:07 ` [PATCH v5 2/6] mm/cma: introduce new zone, ZONE_CMA js1304
2016-08-29 5:07 ` js1304
2016-08-30 10:35 ` Aneesh Kumar K.V
2016-08-30 10:35 ` Aneesh Kumar K.V
2016-08-30 12:40 ` Aneesh Kumar K.V
2016-08-30 12:40 ` Aneesh Kumar K.V
2016-08-31 7:58 ` Joonsoo Kim
2016-08-31 7:58 ` Joonsoo Kim
2016-09-21 9:11 ` Vlastimil Babka
2016-09-21 9:11 ` Vlastimil Babka
2016-08-29 5:07 ` [PATCH v5 3/6] mm/cma: populate ZONE_CMA js1304
2016-08-29 5:07 ` js1304
2016-09-21 9:20 ` Vlastimil Babka
2016-09-21 9:20 ` Vlastimil Babka
2016-09-22 5:45 ` Joonsoo Kim
2016-09-22 5:45 ` Joonsoo Kim
2016-09-22 6:50 ` Joonsoo Kim
2016-09-22 6:50 ` Joonsoo Kim
2016-09-22 15:59 ` Vlastimil Babka
2016-09-22 15:59 ` Vlastimil Babka
2016-09-28 5:34 ` Joonsoo Kim
2016-09-28 5:34 ` Joonsoo Kim
2016-08-29 5:07 ` [PATCH v5 4/6] mm/cma: remove ALLOC_CMA js1304
2016-08-29 5:07 ` js1304
2016-08-29 5:07 ` [PATCH v5 5/6] mm/cma: remove MIGRATE_CMA js1304
2016-08-29 5:07 ` js1304
2016-08-29 5:07 ` [PATCH v5 6/6] mm/cma: remove per zone CMA stat js1304
2016-08-29 5:07 ` js1304
2016-08-29 9:27 ` [PATCH v5 0/6] Introduce ZONE_CMA Aneesh Kumar K.V
2016-08-29 9:27 ` Aneesh Kumar K.V
2016-08-30 8:21 ` Joonsoo Kim
2016-08-30 8:21 ` Joonsoo Kim
2016-08-30 10:39 ` Aneesh Kumar K.V
2016-08-30 10:39 ` Aneesh Kumar K.V
2016-08-31 8:03 ` Joonsoo Kim
2016-08-31 8:03 ` Joonsoo Kim
2016-09-01 5:47 ` Aneesh Kumar K.V
2016-09-01 5:47 ` Aneesh Kumar K.V
2016-09-01 6:01 ` Joonsoo Kim
2016-09-01 6:01 ` Joonsoo Kim
2016-09-21 14:47 ` Aneesh Kumar K.V
2016-09-21 14:47 ` Aneesh Kumar K.V
2016-09-22 5:32 ` Joonsoo Kim
2016-09-22 5:32 ` 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=87sht0y1rq.fsf@linux.vnet.ibm.com \
--to=aneesh.kumar@linux.vnet.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=hannes@cmpxchg.org \
--cc=iamjoonsoo.kim@lge.com \
--cc=js1304@gmail.com \
--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=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 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.