Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1282749 > unrolled thread

[PATCH v3 3/7] mm/compaction: initialize compact_order_failed to MAX_ORDER

Started byJoonsoo Kim <js1304@gmail.com>
First post2015-12-03 08:20 +0100
Last post2015-12-04 16:40 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 3/7] mm/compaction: initialize compact_order_failed to MAX_ORDER Joonsoo Kim <js1304@gmail.com> - 2015-12-03 08:20 +0100
    Re: [PATCH v3 3/7] mm/compaction: initialize compact_order_failed to  MAX_ORDER Vlastimil Babka <vbabka@suse.cz> - 2015-12-04 16:40 +0100

#1282749 — [PATCH v3 3/7] mm/compaction: initialize compact_order_failed to MAX_ORDER

FromJoonsoo Kim <js1304@gmail.com>
Date2015-12-03 08:20 +0100
Subject[PATCH v3 3/7] mm/compaction: initialize compact_order_failed to MAX_ORDER
Message-ID<qBwlj-1No-13@gated-at.bofh.it>
If compact_order_failed is initialized to 0 and order-9
compaction is continually failed, defer counter will be updated
to activate deferring. Although other defer counters will be properly
updated, compact_order_failed will not be updated because failed order
cannot be lower than compact_order_failed, 0. In this case,
low order compaction such as 2, 3 could be deferred due to
this wrongly initialized compact_order_failed value. This patch
removes this possibility by initializing it to MAX_ORDER.

Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
---
 mm/page_alloc.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index d0499ff..7002c66 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -5273,6 +5273,9 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat)
 		zone_seqlock_init(zone);
 		zone->zone_pgdat = pgdat;
 		zone_pcp_init(zone);
+#ifdef CONFIG_COMPACTION
+		zone->compact_order_failed = MAX_ORDER;
+#endif
 
 		/* For bootup, initialized properly in watermark setup */
 		mod_zone_page_state(zone, NR_ALLOC_BATCH, zone->managed_pages);
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1283939 — Re: [PATCH v3 3/7] mm/compaction: initialize compact_order_failed to MAX_ORDER

FromVlastimil Babka <vbabka@suse.cz>
Date2015-12-04 16:40 +0100
SubjectRe: [PATCH v3 3/7] mm/compaction: initialize compact_order_failed to MAX_ORDER
Message-ID<qC0CJ-4wp-19@gated-at.bofh.it>
In reply to#1282749
On 12/03/2015 08:11 AM, Joonsoo Kim wrote:
> If compact_order_failed is initialized to 0 and order-9
> compaction is continually failed, defer counter will be updated
> to activate deferring. Although other defer counters will be properly
> updated, compact_order_failed will not be updated because failed order
> cannot be lower than compact_order_failed, 0. In this case,
> low order compaction such as 2, 3 could be deferred due to
> this wrongly initialized compact_order_failed value. This patch
> removes this possibility by initializing it to MAX_ORDER.
>
> Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>

Good catch.

Acked-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>   mm/page_alloc.c | 3 +++
>   1 file changed, 3 insertions(+)
>
> diff --git a/mm/page_alloc.c b/mm/page_alloc.c
> index d0499ff..7002c66 100644
> --- a/mm/page_alloc.c
> +++ b/mm/page_alloc.c
> @@ -5273,6 +5273,9 @@ static void __paginginit free_area_init_core(struct pglist_data *pgdat)
>   		zone_seqlock_init(zone);
>   		zone->zone_pgdat = pgdat;
>   		zone_pcp_init(zone);
> +#ifdef CONFIG_COMPACTION
> +		zone->compact_order_failed = MAX_ORDER;
> +#endif
>
>   		/* For bootup, initialized properly in watermark setup */
>   		mod_zone_page_state(zone, NR_ALLOC_BATCH, zone->managed_pages);
>

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web