From: Vlastimil Babka <vbabka@suse.cz> To: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mgorman@techsingularity.net>, David Rientjes <rientjes@google.com>, kernel-team@fb.com, kernel-team@lge.com Subject: Re: [PATCH v3 4/8] mm, page_alloc: count movable pages when stealing from pageblock Date: Wed, 29 Mar 2017 17:49:57 +0200 [thread overview] Message-ID: <0da9d0e1-59f3-79f2-2bc4-6c381f103813@suse.cz> (raw) In-Reply-To: <20170316015323.GB14063@js1304-P5Q-DELUXE> On 03/16/2017 02:53 AM, Joonsoo Kim wrote: > On Tue, Mar 07, 2017 at 02:15:41PM +0100, Vlastimil Babka wrote: >> When stealing pages from pageblock of a different migratetype, we count how >> many free pages were stolen, and change the pageblock's migratetype if more >> than half of the pageblock was free. This might be too conservative, as there >> might be other pages that are not free, but were allocated with the same >> migratetype as our allocation requested. > > I think that too conservative is good for movable case. In my experiments, > fragmentation spreads out when unmovable/reclaimable pageblock is > changed to movable pageblock prematurely ('prematurely' means that > allocated unmovable pages remains). As you said below, movable allocations > falling back to other pageblocks don't causes permanent fragmentation. > Therefore, we don't need to be less conservative for movable > allocation. So, how about following change to keep the criteria for > movable allocation conservative even with this counting improvement? > > threshold = (1 << (pageblock_order - 1)); > if (start_type == MIGRATE_MOVABLE) > threshold += (1 << (pageblock_order - 2)); > > if (free_pages + alike_pages >= threshold) > ... That could help, or also not. Keeping more pageblocks marked as unmovable also means that more unmovable allocations will spread out to them all, even if they would fit within less pageblocks. MIGRATE_MIXED was an idea to help in this case, as truly unmovable pageblocks would be preferred to the mixed ones. Can't decide about such change without testing :/ > Thanks. >
WARNING: multiple messages have this Message-ID (diff)
From: Vlastimil Babka <vbabka@suse.cz> To: Joonsoo Kim <iamjoonsoo.kim@lge.com> Cc: Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Johannes Weiner <hannes@cmpxchg.org>, Mel Gorman <mgorman@techsingularity.net>, David Rientjes <rientjes@google.com>, kernel-team@fb.com, kernel-team@lge.com Subject: Re: [PATCH v3 4/8] mm, page_alloc: count movable pages when stealing from pageblock Date: Wed, 29 Mar 2017 17:49:57 +0200 [thread overview] Message-ID: <0da9d0e1-59f3-79f2-2bc4-6c381f103813@suse.cz> (raw) In-Reply-To: <20170316015323.GB14063@js1304-P5Q-DELUXE> On 03/16/2017 02:53 AM, Joonsoo Kim wrote: > On Tue, Mar 07, 2017 at 02:15:41PM +0100, Vlastimil Babka wrote: >> When stealing pages from pageblock of a different migratetype, we count how >> many free pages were stolen, and change the pageblock's migratetype if more >> than half of the pageblock was free. This might be too conservative, as there >> might be other pages that are not free, but were allocated with the same >> migratetype as our allocation requested. > > I think that too conservative is good for movable case. In my experiments, > fragmentation spreads out when unmovable/reclaimable pageblock is > changed to movable pageblock prematurely ('prematurely' means that > allocated unmovable pages remains). As you said below, movable allocations > falling back to other pageblocks don't causes permanent fragmentation. > Therefore, we don't need to be less conservative for movable > allocation. So, how about following change to keep the criteria for > movable allocation conservative even with this counting improvement? > > threshold = (1 << (pageblock_order - 1)); > if (start_type == MIGRATE_MOVABLE) > threshold += (1 << (pageblock_order - 2)); > > if (free_pages + alike_pages >= threshold) > ... That could help, or also not. Keeping more pageblocks marked as unmovable also means that more unmovable allocations will spread out to them all, even if they would fit within less pageblocks. MIGRATE_MIXED was an idea to help in this case, as truly unmovable pageblocks would be preferred to the mixed ones. Can't decide about such change without testing :/ > 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:[~2017-03-29 15:50 UTC|newest] Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-03-07 13:15 [PATCH v3 0/8] try to reduce fragmenting fallbacks Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 1/8] mm, compaction: reorder fields in struct compact_control Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 2/8] mm, compaction: remove redundant watermark check in compact_finished() Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-16 1:30 ` Joonsoo Kim 2017-03-16 1:30 ` Joonsoo Kim 2017-03-29 15:30 ` Vlastimil Babka 2017-03-29 15:30 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 3/8] mm, page_alloc: split smallest stolen page in fallback Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 4/8] mm, page_alloc: count movable pages when stealing from pageblock Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-16 1:53 ` Joonsoo Kim 2017-03-16 1:53 ` Joonsoo Kim 2017-03-29 15:49 ` Vlastimil Babka [this message] 2017-03-29 15:49 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 5/8] mm, compaction: change migrate_async_suitable() to suitable_migration_source() Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 6/8] mm, compaction: add migratetype to compact_control Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 7/8] mm, compaction: restrict async compaction to pageblocks of same migratetype Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-16 2:14 ` Joonsoo Kim 2017-03-16 2:14 ` Joonsoo Kim 2017-03-29 16:06 ` Vlastimil Babka 2017-03-29 16:06 ` Vlastimil Babka 2017-04-07 0:38 ` Joonsoo Kim 2017-04-07 0:38 ` Joonsoo Kim 2017-05-04 6:12 ` Vlastimil Babka 2017-05-04 6:12 ` Vlastimil Babka 2017-03-07 13:15 ` [PATCH v3 8/8] mm, compaction: finish whole pageblock to reduce fragmentation Vlastimil Babka 2017-03-07 13:15 ` Vlastimil Babka 2017-03-16 2:18 ` Joonsoo Kim 2017-03-16 2:18 ` Joonsoo Kim 2017-03-29 16:13 ` Vlastimil Babka 2017-03-29 16:13 ` Vlastimil Babka 2017-03-08 16:46 ` [PATCH v3 0/8] try to reduce fragmenting fallbacks Johannes Weiner 2017-03-08 16:46 ` Johannes Weiner 2017-03-08 19:17 ` Vlastimil Babka 2017-03-08 19:17 ` Vlastimil Babka 2017-03-16 18:34 ` Johannes Weiner 2017-03-16 18:34 ` Johannes Weiner 2017-03-17 18:29 ` Vlastimil Babka 2017-03-17 18:29 ` Vlastimil Babka 2017-03-19 21:23 ` Johannes Weiner 2017-03-19 21:23 ` Johannes Weiner
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=0da9d0e1-59f3-79f2-2bc4-6c381f103813@suse.cz \ --to=vbabka@suse.cz \ --cc=akpm@linux-foundation.org \ --cc=hannes@cmpxchg.org \ --cc=iamjoonsoo.kim@lge.com \ --cc=kernel-team@fb.com \ --cc=kernel-team@lge.com \ --cc=linux-kernel@vger.kernel.org \ --cc=linux-mm@kvack.org \ --cc=mgorman@techsingularity.net \ --cc=rientjes@google.com \ /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: linkBe 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.