linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Hugh Dickins <hughd@google.com>, Joonsoo Kim <js1304@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Mel Gorman <mgorman@suse.de>,
	David Rientjes <rientjes@google.com>,
	Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>,
	Hillf Danton <hillf.zj@alibaba-inc.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
	linux-mm@kvack.org, LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/3] OOM detection rework v4
Date: Wed, 2 Mar 2016 14:00:23 +0100	[thread overview]
Message-ID: <20160302130022.GG26686@dhcp22.suse.cz> (raw)
In-Reply-To: <20160302122410.GD26686@dhcp22.suse.cz>

[-- Attachment #1: Type: text/plain, Size: 3955 bytes --]

On Wed 02-03-16 13:24:10, Michal Hocko wrote:
> On Tue 01-03-16 19:14:08, Vlastimil Babka wrote:
[...]
> > I would suggest enabling all compaction tracepoint and the migration
> > tracepoint. Looking at the trace could hopefully help faster than
> > going one trace_printk() per attempt.
> 
> OK, here we go with both watermarks checks removed and hopefully all the
> compaction related tracepoints enabled:
> echo 1 > /debug/tracing/events/compaction/enable
> echo 1 > /debug/tracing/events/migrate/mm_migrate_pages/enable
> 
> this was without the hugetlb handicap. See the trace log and vmstat
> after the run attached.

Just for the reference the above was with:
diff --git a/mm/compaction.c b/mm/compaction.c
index 4d99e1f5055c..7364e48cf69a 100644
--- a/mm/compaction.c
+++ b/mm/compaction.c
@@ -1276,6 +1276,9 @@ static unsigned long __compaction_suitable(struct zone *zone, int order,
 								alloc_flags))
 		return COMPACT_PARTIAL;
 
+	if (order <= PAGE_ALLOC_COSTLY_ORDER)
+		return COMPACT_CONTINUE;
+
 	/*
 	 * Watermarks for order-0 must be met for compaction. Note the 2UL.
 	 * This is because during migration, copies of pages need to be
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 1993894b4219..50954a9a4433 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -2245,7 +2245,6 @@ EXPORT_SYMBOL_GPL(split_page);
 
 int __isolate_free_page(struct page *page, unsigned int order)
 {
-	unsigned long watermark;
 	struct zone *zone;
 	int mt;
 
@@ -2254,14 +2253,8 @@ int __isolate_free_page(struct page *page, unsigned int order)
 	zone = page_zone(page);
 	mt = get_pageblock_migratetype(page);
 
-	if (!is_migrate_isolate(mt)) {
-		/* Obey watermarks as if the page was being allocated */
-		watermark = low_wmark_pages(zone) + (1 << order);
-		if (!zone_watermark_ok(zone, 0, watermark, 0, 0))
-			return 0;
-
+	if (!is_migrate_isolate(mt))
 		__mod_zone_freepage_state(zone, -(1UL << order), mt);
-	}
 
 	/* Remove page from free list */
 	list_del(&page->lru);

And I rerun the same with the clean mmotm tree and the results are
attached.

As we can see there was less scanning on dma32 both in direct and kswapd
reclaim.
$ grep direct vmstat.*
vmstat.mmotm.log:pgsteal_direct_dma 420
vmstat.mmotm.log:pgsteal_direct_dma32 71234
vmstat.mmotm.log:pgsteal_direct_normal 0
vmstat.mmotm.log:pgsteal_direct_movable 0
vmstat.mmotm.log:pgscan_direct_dma 990
vmstat.mmotm.log:pgscan_direct_dma32 144376
vmstat.mmotm.log:pgscan_direct_normal 0
vmstat.mmotm.log:pgscan_direct_movable 0
vmstat.mmotm.log:pgscan_direct_throttle 0
vmstat.updated.log:pgsteal_direct_dma 334
vmstat.updated.log:pgsteal_direct_dma32 71877
vmstat.updated.log:pgsteal_direct_normal 0
vmstat.updated.log:pgsteal_direct_movable 0
vmstat.updated.log:pgscan_direct_dma 670
vmstat.updated.log:pgscan_direct_dma32 137488
vmstat.updated.log:pgscan_direct_normal 0
vmstat.updated.log:pgscan_direct_movable 0
vmstat.updated.log:pgscan_direct_throttle 0
$ grep kswapd vmstat.*
vmstat.mmotm.log:pgsteal_kswapd_dma 5602
vmstat.mmotm.log:pgsteal_kswapd_dma32 332336
vmstat.mmotm.log:pgsteal_kswapd_normal 0
vmstat.mmotm.log:pgsteal_kswapd_movable 0
vmstat.mmotm.log:pgscan_kswapd_dma 12187
vmstat.mmotm.log:pgscan_kswapd_dma32 679667
vmstat.mmotm.log:pgscan_kswapd_normal 0
vmstat.mmotm.log:pgscan_kswapd_movable 0
vmstat.mmotm.log:kswapd_inodesteal 0
vmstat.mmotm.log:kswapd_low_wmark_hit_quickly 339
vmstat.mmotm.log:kswapd_high_wmark_hit_quickly 10
vmstat.updated.log:pgsteal_kswapd_dma 5339
vmstat.updated.log:pgsteal_kswapd_dma32 322951
vmstat.updated.log:pgsteal_kswapd_normal 0
vmstat.updated.log:pgsteal_kswapd_movable 0
vmstat.updated.log:pgscan_kswapd_dma 11213
vmstat.updated.log:pgscan_kswapd_dma32 653096
vmstat.updated.log:pgscan_kswapd_normal 0
vmstat.updated.log:pgscan_kswapd_movable 0
vmstat.updated.log:kswapd_inodesteal 0
vmstat.updated.log:kswapd_low_wmark_hit_quickly 351
vmstat.updated.log:kswapd_high_wmark_hit_quickly 13
-- 
Michal Hocko
SUSE Labs

[-- Attachment #2: trace.mmotm.log.gz --]
[-- Type: application/gzip, Size: 512968 bytes --]

[-- Attachment #3: vmstat.mmotm.log --]
[-- Type: text/plain, Size: 2335 bytes --]

nr_free_pages 149226
nr_alloc_batch 114
nr_inactive_anon 13962
nr_active_anon 46754
nr_inactive_file 634
nr_active_file 5010
nr_unevictable 0
nr_mlock 0
nr_anon_pages 219
nr_mapped 793
nr_file_pages 66233
nr_dirty 0
nr_writeback 0
nr_slab_reclaimable 12355
nr_slab_unreclaimable 21208
nr_page_table_pages 320
nr_kernel_stack 92
nr_unstable 0
nr_bounce 0
nr_vmscan_write 358705
nr_vmscan_immediate_reclaim 111
nr_writeback_temp 0
nr_isolated_anon 0
nr_isolated_file 0
nr_shmem 58505
nr_dirtied 5516
nr_written 360677
nr_pages_scanned 0
workingset_refault 17291
workingset_activate 11908
workingset_nodereclaim 644
nr_anon_transparent_hugepages 0
nr_free_cma 0
nr_dirty_threshold 30487
nr_dirty_background_threshold 15243
pgpgin 525267
pgpgout 1444464
pswpin 75386
pswpout 358705
pgalloc_dma 241466
pgalloc_dma32 21491760
pgalloc_normal 0
pgalloc_movable 0
pgfree 22110844
pgactivate 204005
pgdeactivate 1033621
pgfault 23929641
pgmajfault 27748
pglazyfreed 0
pgrefill_dma 18759
pgrefill_dma32 1122090
pgrefill_normal 0
pgrefill_movable 0
pgsteal_kswapd_dma 5602
pgsteal_kswapd_dma32 332336
pgsteal_kswapd_normal 0
pgsteal_kswapd_movable 0
pgsteal_direct_dma 420
pgsteal_direct_dma32 71234
pgsteal_direct_normal 0
pgsteal_direct_movable 0
pgscan_kswapd_dma 12187
pgscan_kswapd_dma32 679667
pgscan_kswapd_normal 0
pgscan_kswapd_movable 0
pgscan_direct_dma 990
pgscan_direct_dma32 144376
pgscan_direct_normal 0
pgscan_direct_movable 0
pgscan_direct_throttle 0
pginodesteal 0
slabs_scanned 2052
kswapd_inodesteal 0
kswapd_low_wmark_hit_quickly 339
kswapd_high_wmark_hit_quickly 10
pageoutrun 448
allocstall 1376
pgrotated 357091
drop_pagecache 0
drop_slab 0
pgmigrate_success 227102
pgmigrate_fail 142
compact_migrate_scanned 374515
compact_free_scanned 4000566
compact_isolated 456131
compact_stall 133
compact_fail 73
compact_success 60
compact_kcompatd_wake 0
htlb_buddy_alloc_success 0
htlb_buddy_alloc_fail 0
unevictable_pgs_culled 1087
unevictable_pgs_scanned 0
unevictable_pgs_rescued 1530
unevictable_pgs_mlocked 1530
unevictable_pgs_munlocked 1529
unevictable_pgs_cleared 1
unevictable_pgs_stranded 0
thp_fault_alloc 164
thp_fault_fallback 26
thp_collapse_alloc 159
thp_collapse_alloc_failed 11
thp_split_page 0
thp_split_page_failed 0
thp_deferred_split_page 309
thp_split_pmd 7
thp_zero_page_alloc 3
thp_zero_page_alloc_failed 0

  reply	other threads:[~2016-03-02 13:00 UTC|newest]

Thread overview: 152+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-15 18:19 Michal Hocko
2015-12-15 18:19 ` [PATCH 1/3] mm, oom: rework oom detection Michal Hocko
2016-01-14 22:58   ` David Rientjes
2016-01-16  1:07     ` Tetsuo Handa
2016-01-19 22:48       ` David Rientjes
2016-01-20 11:13         ` Tetsuo Handa
2016-01-20 13:13           ` Michal Hocko
2016-04-04  8:23   ` Vladimir Davydov
2016-04-04  9:42     ` Michal Hocko
2015-12-15 18:19 ` [PATCH 2/3] mm: throttle on IO only when there are too many dirty and writeback pages Michal Hocko
2016-03-17 11:35   ` Tetsuo Handa
2016-03-17 12:01     ` Michal Hocko
2015-12-15 18:19 ` [PATCH 3/3] mm: use watermak checks for __GFP_REPEAT high order allocations Michal Hocko
2015-12-16 23:35 ` [PATCH 0/3] OOM detection rework v4 Andrew Morton
2015-12-18 12:12   ` Michal Hocko
2015-12-16 23:58 ` Andrew Morton
2015-12-18 13:15   ` Michal Hocko
2015-12-18 16:35     ` Johannes Weiner
2015-12-24 12:41 ` Tetsuo Handa
2015-12-28 12:08   ` Tetsuo Handa
2015-12-28 14:13     ` Tetsuo Handa
2016-01-06 12:44       ` Vlastimil Babka
2016-01-08 12:37       ` Michal Hocko
2015-12-29 16:32     ` Michal Hocko
2015-12-30 15:05       ` Tetsuo Handa
2016-01-02 15:47         ` Tetsuo Handa
2016-01-20 12:24           ` Michal Hocko
2016-01-27 23:18             ` David Rientjes
2016-01-28 21:19               ` Michal Hocko
2015-12-29 16:27   ` Michal Hocko
2016-01-28 20:40 ` [PATCH 4/3] mm, oom: drop the last allocation attempt before out_of_memory Michal Hocko
2016-01-28 21:36   ` Johannes Weiner
2016-01-28 23:19     ` David Rientjes
2016-01-28 23:51       ` Johannes Weiner
2016-01-29 10:39         ` Tetsuo Handa
2016-01-29 15:32         ` Michal Hocko
2016-01-30 12:18           ` Tetsuo Handa
2016-01-29 15:23       ` Michal Hocko
2016-01-29 15:24     ` Michal Hocko
2016-01-28 21:19 ` [PATCH 5/3] mm, vmscan: make zone_reclaimable_pages more precise Michal Hocko
2016-01-28 23:20   ` David Rientjes
2016-01-29  3:41   ` Hillf Danton
2016-01-29 10:35   ` Tetsuo Handa
2016-01-29 15:17     ` Michal Hocko
2016-01-29 21:30       ` Tetsuo Handa
2016-02-03 13:27 ` [PATCH 0/3] OOM detection rework v4 Michal Hocko
2016-02-03 22:58   ` David Rientjes
2016-02-04 12:57     ` Michal Hocko
2016-02-04 13:10       ` Tetsuo Handa
2016-02-04 13:39         ` Michal Hocko
2016-02-04 14:24           ` Michal Hocko
2016-02-07  4:09           ` Tetsuo Handa
2016-02-15 20:06             ` Michal Hocko
2016-02-16 13:10               ` Tetsuo Handa
2016-02-16 15:19                 ` Michal Hocko
2016-02-25  3:47   ` Hugh Dickins
2016-02-25  6:48     ` Sergey Senozhatsky
2016-02-25  9:17       ` Hillf Danton
2016-02-25  9:27         ` Michal Hocko
2016-02-25  9:48           ` Hillf Danton
2016-02-25 11:02             ` Sergey Senozhatsky
2016-02-25  9:23     ` Michal Hocko
2016-02-26  6:32       ` Hugh Dickins
2016-02-26  7:54         ` Hillf Danton
2016-02-26  9:24           ` Michal Hocko
2016-02-26 10:27             ` Hillf Danton
2016-02-26 13:49               ` Michal Hocko
2016-02-26  9:33         ` Michal Hocko
2016-02-29 21:02       ` Michal Hocko
2016-03-02  2:19         ` Joonsoo Kim
2016-03-02  9:50           ` Michal Hocko
2016-03-02 13:32             ` Joonsoo Kim
2016-03-02 14:06               ` Michal Hocko
2016-03-02 14:34                 ` Joonsoo Kim
2016-03-03  9:26                   ` Michal Hocko
2016-03-03 10:29                     ` Tetsuo Handa
2016-03-03 14:10                     ` Joonsoo Kim
2016-03-03 15:25                       ` Michal Hocko
2016-03-04  5:23                         ` Joonsoo Kim
2016-03-04 15:15                           ` Michal Hocko
2016-03-04 17:39                             ` Michal Hocko
2016-03-07  5:23                             ` Joonsoo Kim
2016-03-03 15:50                       ` Vlastimil Babka
2016-03-03 16:26                         ` Michal Hocko
2016-03-04  7:10                         ` Joonsoo Kim
2016-03-02 15:01             ` Minchan Kim
2016-03-07 16:08         ` [PATCH] mm, oom: protect !costly allocations some more (was: Re: [PATCH 0/3] OOM detection rework v4) Michal Hocko
2016-03-08  3:51           ` Sergey Senozhatsky
2016-03-08  9:08             ` Michal Hocko
2016-03-08  9:24               ` Sergey Senozhatsky
2016-03-08  9:24           ` [PATCH] mm, oom: protect !costly allocations some more Vlastimil Babka
2016-03-08  9:32             ` Sergey Senozhatsky
2016-03-08  9:46             ` Michal Hocko
2016-03-08  9:52               ` Vlastimil Babka
2016-03-08 10:10                 ` Michal Hocko
2016-03-08 11:12                   ` Vlastimil Babka
2016-03-08 12:22                     ` Michal Hocko
2016-03-08 12:29                       ` Vlastimil Babka
2016-03-08  9:58           ` [PATCH] mm, oom: protect !costly allocations some more (was: Re: [PATCH 0/3] OOM detection rework v4) Sergey Senozhatsky
2016-03-08 13:57             ` Michal Hocko
2016-03-08 10:36           ` Hugh Dickins
2016-03-08 13:42           ` [PATCH 0/2] oom rework: high order enahncements Michal Hocko
2016-03-08 13:42             ` [PATCH 1/3] mm, compaction: change COMPACT_ constants into enum Michal Hocko
2016-03-08 14:19               ` Vlastimil Babka
2016-03-09  3:55               ` Hillf Danton
2016-03-08 13:42             ` [PATCH 2/3] mm, compaction: cover all compaction mode in compact_zone Michal Hocko
2016-03-08 14:22               ` Vlastimil Babka
2016-03-09  3:57               ` Hillf Danton
2016-03-08 13:42             ` [PATCH 3/3] mm, oom: protect !costly allocations some more Michal Hocko
2016-03-08 14:34               ` Vlastimil Babka
2016-03-08 14:48                 ` Michal Hocko
2016-03-08 15:03                   ` Vlastimil Babka
2016-03-09 11:11               ` Michal Hocko
2016-03-09 14:07                 ` Vlastimil Babka
2016-03-11 12:17                 ` Hugh Dickins
2016-03-11 13:06                   ` Michal Hocko
2016-03-11 19:08                     ` Hugh Dickins
2016-03-14 16:21                       ` Michal Hocko
2016-03-08 15:19           ` [PATCH] mm, oom: protect !costly allocations some more (was: Re: [PATCH 0/3] OOM detection rework v4) Joonsoo Kim
2016-03-08 16:05             ` Michal Hocko
2016-03-08 17:03               ` Joonsoo Kim
2016-03-09 10:41                 ` Michal Hocko
2016-03-11 14:53                   ` Joonsoo Kim
2016-03-11 15:20                     ` Michal Hocko
2016-02-29 20:35     ` [PATCH 0/3] OOM detection rework v4 Michal Hocko
2016-03-01  7:29       ` Hugh Dickins
2016-03-01 13:38         ` Michal Hocko
2016-03-01 14:40           ` Michal Hocko
2016-03-01 18:14           ` Vlastimil Babka
2016-03-02  2:55             ` Joonsoo Kim
2016-03-02 12:37               ` Michal Hocko
2016-03-02 14:06                 ` Joonsoo Kim
2016-03-02 12:24             ` Michal Hocko
2016-03-02 13:00               ` Michal Hocko [this message]
2016-03-02 13:22               ` Vlastimil Babka
2016-03-02  2:28           ` Joonsoo Kim
2016-03-02 12:39             ` Michal Hocko
2016-03-03  9:54           ` Hugh Dickins
2016-03-03 12:32             ` Michal Hocko
2016-03-03 20:57               ` Hugh Dickins
2016-03-04  7:41                 ` Vlastimil Babka
2016-03-04  7:53             ` Joonsoo Kim
2016-03-04 12:28             ` Michal Hocko
2016-03-11 10:45 ` Tetsuo Handa
2016-03-11 13:08   ` Michal Hocko
2016-03-11 13:32     ` Tetsuo Handa
2016-03-11 15:28       ` Michal Hocko
2016-03-11 16:49         ` Tetsuo Handa
2016-03-11 17:00           ` Michal Hocko
2016-03-11 17:20             ` Tetsuo Handa
2016-03-12  4:08               ` Tetsuo Handa
2016-03-13 14:41                 ` Tetsuo Handa

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=20160302130022.GG26686@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=hannes@cmpxchg.org \
    --cc=hillf.zj@alibaba-inc.com \
    --cc=hughd@google.com \
    --cc=js1304@gmail.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=penguin-kernel@i-love.sakura.ne.jp \
    --cc=rientjes@google.com \
    --cc=torvalds@linux-foundation.org \
    --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