linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Joonsoo Kim <js1304@gmail.com>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Ralf-Peter Rohbeck <Ralf-Peter.Rohbeck@quantum.com>,
	Joonsoo Kim <iamjoonsoo.kim@lge.com>,
	Michal Hocko <mhocko@suse.cz>,
	"linux-mm@kvack.org" <linux-mm@kvack.org>
Subject: Re: OOM killer changes
Date: Wed, 17 Aug 2016 17:16:10 +0900	[thread overview]
Message-ID: <CAAmzW4M0gmhn1Nub=kB-4gfxviCunmWYEMhj-uVfX+k5pVtmeA@mail.gmail.com> (raw)
In-Reply-To: <8db47fdf-2d6a-d234-479e-6cc81be98655@suse.cz>

2016-08-17 16:56 GMT+09:00 Vlastimil Babka <vbabka@suse.cz>:
> On 08/17/2016 06:48 AM, Ralf-Peter Rohbeck wrote:
>>> ------------>8-----------
>>> diff --git a/mm/compaction.c b/mm/compaction.c
>>> index 9affb29..965eddd 100644
>>> --- a/mm/compaction.c
>>> +++ b/mm/compaction.c
>>> @@ -1082,10 +1082,6 @@ static void isolate_freepages(struct compact_control *cc)
>>>                  if (!page)
>>>                          continue;
>>>
>>> -               /* Check the block is suitable for migration */
>>> -               if (!suitable_migration_target(page))
>>> -                       continue;
>>> -
>>>                  /* If isolation recently failed, do not retry */
>>>                  if (!isolation_suitable(cc, page))
>>>                          continue;
>>>
>> That seemed to help a little (subjectively) but still OOM killed a
>> kernel build. The logs are attached.
>
>> grep XXX messages
> Aug 16 20:29:13 fs kernel: [ 6850.467250] XXX: compaction_failed
>
> pagetypeinfo_after:
> Number of blocks type     Unmovable      Movable  Reclaimable   HighAtomic      Isolate
> Node 0, zone      DMA            1            7            0            0            0
> Node 0, zone    DMA32          879           93           44            0            0
> Node 0, zone   Normal         2862          136           74            0            0
>
> vmstat_after:
> pgmigrate_success 5123
> pgmigrate_fail 4106
> compact_migrate_scanned 62019
> compact_free_scanned 44314328
> compact_isolated 18572
> compact_stall 327
> compact_fail 236
> compact_success 91
> compact_daemon_wake 1162
>
>> grep try_to_release trace_pipe.log | wc -l
> 0
>
> Again, migration failures are there but not so many, and failures to
> isolate freepages stand out. I assume it's because the kernel build
> workload and not the btrfs balance one.
>
> I think the patches in mmotm could make compaction try harder and use
> more appropriate watermarks, but it's not guaranteed that will help.
> The free scanner seems to become more and more a fundamental problem.

Following trace is last compaction trial before triggering OOM.
Free scanner start at 0x27fe00 but actual scan happens at 0x186a00.
And, although log is snipped, compaction fails because it doesn't find
any freepage.

It skips half of pageblocks in that zone. It would be due to
migratetype or skipbit.
Both Vlastimil's recent patches and my work-around should be applied to solve
this problem.

Other part of trace looks like that my work-around isn't applied.
Could you confirm
that?

Thanks.

              sh-14869 [000] ....  6850.456639:
mm_compaction_try_to_compact_pages: order=2 gfp_mask=0x27000c0 mode=1
              sh-14869 [000] ....  6850.456640:
mm_compaction_suitable: node=0 zone=Normal   order=2 ret=continue
              sh-14869 [000] ....  6850.456641: mm_compaction_begin:
zone_start=0x100000 migrate_pfn=0x100000 free_pfn=0x27fe00
zone_end=0x280000, mode=sync
              sh-14869 [000] ....  6850.456641:
mm_compaction_finished: node=0 zone=Normal   order=2 ret=continue
              sh-14869 [000] ....  6850.456648:
mm_compaction_isolate_migratepages: range=(0x100000 ~ 0x10002d)
nr_scanned=45 nr_taken=32
              sh-14869 [000] ....  6850.456834:
mm_compaction_isolate_freepages: range=(0x186a00 ~ 0x186c00)
nr_scanned=512 nr_taken=0
              sh-14869 [000] ....  6850.456842:
mm_compaction_isolate_freepages: range=(0x186800 ~ 0x186a00)
nr_scanned=512 nr_taken=0


> And I really wonder how did all those unmovable pageblocks happen.
> AFAICS zoneinfo shows that most of memory is occupied by file lru pages.
> These should be movable.
>
> --
> 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>

--
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>

  reply	other threads:[~2016-08-17  8:16 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <d8f3adcc-3607-1ef6-9ec5-82b2e125eef2@quantum.com>
2016-08-01  6:16 ` OOM killer changes Michal Hocko
     [not found]   ` <b1a39756-a0b5-1900-6575-d6e1f502cb26@Quantum.com>
     [not found]     ` <20160801182358.GB31957@dhcp22.suse.cz>
     [not found]       ` <30dbabc4-585c-55a5-9f3a-4e243c28356a@Quantum.com>
2016-08-01 19:26         ` Michal Hocko
2016-08-01 19:35           ` Ralf-Peter Rohbeck
2016-08-01 19:43             ` Michal Hocko
2016-08-01 19:52               ` Ralf-Peter Rohbeck
2016-08-01 20:09                 ` Michal Hocko
2016-08-01 20:16                   ` Ralf-Peter Rohbeck
2016-08-01 20:26                     ` Michal Hocko
2016-08-01 21:14                       ` Ralf-Peter Rohbeck
2016-08-01 21:27                         ` Ralf-Peter Rohbeck
2016-08-02  7:10                           ` Michal Hocko
2016-08-02 19:25                             ` Ralf-Peter Rohbeck
2016-08-15  4:48                               ` Ralf-Peter Rohbeck
2016-08-15  9:16                                 ` Vlastimil Babka
2016-08-15 15:01                                   ` Michal Hocko
2016-08-15 18:42                                     ` Ralf-Peter Rohbeck
2016-08-16  7:32                                       ` Michal Hocko
2016-08-16  7:43                                         ` Michal Hocko
2016-08-17  9:14                                           ` Ralf-Peter Rohbeck
2016-08-17  9:23                                             ` Vlastimil Babka
2016-08-17  9:28                                               ` Ralf-Peter Rohbeck
2016-08-17  9:33                                                 ` Michal Hocko
2016-08-17 23:37                                                   ` Ralf-Peter Rohbeck
2016-08-18  6:57                                                     ` Vlastimil Babka
2016-08-18 20:01                                                       ` Ralf-Peter Rohbeck
2016-08-18 20:12                                                         ` Vlastimil Babka
2016-08-19  2:42                                                           ` Ralf-Peter Rohbeck
2016-08-19  6:27                                                             ` Vlastimil Babka
2016-08-19  7:33                                                               ` Michal Hocko
2016-08-19  7:47                                                                 ` Vlastimil Babka
2016-08-19  8:26                                                                   ` Michal Hocko
2016-08-24 18:13                                                                     ` Ralf-Peter Rohbeck
2016-08-25  7:22                                                                       ` Michal Hocko
2016-08-25 20:35                                                                         ` Ralf-Peter Rohbeck
2016-08-26  8:35                                                                           ` Michal Hocko
2016-09-06 11:09                                                                             ` Vlastimil Babka
2016-08-23  5:02                                                               ` Joonsoo Kim
2016-08-23  7:45                                                                 ` Michal Hocko
2016-08-17  0:26                                         ` Ralf-Peter Rohbeck
2016-08-17  7:43                                           ` Vlastimil Babka
2016-08-16  3:12                                   ` Joonsoo Kim
2016-08-16  7:44                                     ` Vlastimil Babka
2016-08-17  4:48                                     ` Ralf-Peter Rohbeck
2016-08-17  7:56                                       ` Vlastimil Babka
2016-08-17  8:16                                         ` Joonsoo Kim [this message]
2016-08-17  9:21                                           ` Ralf-Peter Rohbeck
2016-08-17  9:11                                         ` Ralf-Peter Rohbeck
2016-08-17  9:20                                           ` Vlastimil Babka
2016-08-02  7:11           ` Vlastimil Babka
2016-08-02  9:02           ` Michal Hocko

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='CAAmzW4M0gmhn1Nub=kB-4gfxviCunmWYEMhj-uVfX+k5pVtmeA@mail.gmail.com' \
    --to=js1304@gmail.com \
    --cc=Ralf-Peter.Rohbeck@quantum.com \
    --cc=iamjoonsoo.kim@lge.com \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@suse.cz \
    --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;
as well as URLs for NNTP newsgroup(s).