From: David Hildenbrand <david@redhat.com>
To: Michal Hocko <mhocko@suse.com>, Yajun Deng <yajun.deng@linux.dev>
Cc: osalvador@suse.de, akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/memory_hotplug: fix dead loop in offline_pages()
Date: Fri, 28 Apr 2023 18:22:38 +0200 [thread overview]
Message-ID: <ae2e301d-21ae-bf25-57b5-b9be9777bfe2@redhat.com> (raw)
In-Reply-To: <ZEuo8PiA3EzVnrEi@dhcp22.suse.cz>
On 28.04.23 13:07, Michal Hocko wrote:
> On Fri 28-04-23 18:08:46, Yajun Deng wrote:
>> When migration failure in do_migrate_range() and then the
>> scan_movable_pages() will most likely return the same movable pfn.
>> In this case, there is no condition to bail out, they will
>> always run like this:
>>
>> ...
>> [878020.623959] migrating pfn 1727813 failed ret:1
>> [878020.623960] page:00000000faa9673c refcount:3 mapcount:0 mapping:00000000144ccd79 index:0x14280025 pfn:0x1727813
>> [878020.623962] memcg:ffffa0ff82d5a000
>> [878020.623962] aops:def_blk_aops ino:fd00001
>> [878020.623964] flags: 0x17ffffc000206a(referenced|dirty|active|workingset|private|node=0|zone=2|lastcpupid=0x1fffff)
>> [878020.623966] raw: 0017ffffc000206a ffffb0d14f50fbd8 ffffb0d14f50fbd8 ffffa0ff9c155018
>> [878020.623967] raw: 0000000014280025 ffffa10327d702d8 00000003ffffffff ffffa0ff82d5a000
>> [878020.623968] page dumped because: migration failure
>> [878020.626196] migrating pfn 1727813 failed ret:1
>> [878020.626198] page:00000000faa9673c refcount:3 mapcount:0 mapping:00000000144ccd79 index:0x14280025 pfn:0x1727813
>> [878020.626200] memcg:ffffa0ff82d5a000
>> [878020.626200] aops:def_blk_aops ino:fd00001
>> [878020.626202] flags: 0x17ffffc000206a(referenced|dirty|active|workingset|private|node=0|zone=2|lastcpupid=0x1fffff)
>> [878020.626204] raw: 0017ffffc000206a ffffb0d14f50fbd8 ffffb0d14f50fbd8 ffffa0ff9c155018
>> [878020.626205] raw: 0000000014280025 ffffa10327d702d8 00000003ffffffff ffffa0ff82d5a000
>> [878020.626206] page dumped because: migration failure
>> ...
>>
>> Bail out when migration failures reach 3 times.
>>
>> Fixes: bb8965bd82fd ("mm, memory_hotplug: deobfuscate migration part of offlining")
>> Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
>
> Any hard coded failure retry limit will lead to premature failures. Have
> a look at 72b39cfc4d75 ("mm, memory_hotplug: do not fail offlining too
> early"). A proper way to deal with this is to implement termination from
> the userspace (e.g. timeout $TIMEOUT /bin/echo 0 > $PATH_TO_MEM/online)
> Nacked-by: Michal Hocko <mhocko@suse.com>
Agreed; it's a bit more complicated when offlining is triggered by ACPI
code :(
--
Thanks,
David / dhildenb
prev parent reply other threads:[~2023-04-28 16:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-28 10:08 Yajun Deng
2023-04-28 11:07 ` Michal Hocko
2023-04-28 16:22 ` David Hildenbrand [this message]
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=ae2e301d-21ae-bf25-57b5-b9be9777bfe2@redhat.com \
--to=david@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=osalvador@suse.de \
--cc=yajun.deng@linux.dev \
/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