linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/2] mm, memory_hotplug: do not fail offlining too early
@ 2017-10-13 11:58 Michal Hocko
  2017-10-13 12:00 ` [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages Michal Hocko
  0 siblings, 1 reply; 31+ messages in thread
From: Michal Hocko @ 2017-10-13 11:58 UTC (permalink / raw)
  To: Michael Ellerman
  Cc: Vlastimil Babka, Andrew Morton, KAMEZAWA Hiroyuki, Reza Arbab,
	Yasuaki Ishimatsu, qiuxishi, Igor Mammedov, Vitaly Kuznetsov,
	linux-mm, LKML

On Fri 13-10-17 22:42:46, Michael Ellerman wrote:
> Vlastimil Babka <vbabka@suse.cz> writes:
> > On 10/11/2017 08:51 AM, Michal Hocko wrote:
> >> On Wed 11-10-17 13:37:50, Michael Ellerman wrote:
> >>> Michal Hocko <mhocko@kernel.org> writes:
> >>>> On Tue 10-10-17 23:05:08, Michael Ellerman wrote:
> >>>>> Michal Hocko <mhocko@kernel.org> writes:
> >>>>>> From: Michal Hocko <mhocko@suse.com>
> >>>>>>
> >>>>>> Memory offlining can fail just too eagerly under a heavy memory pressure.
> ...
> >>>>>
> >>>>> This breaks offline for me.
> >>>>>
> >>>>> Prior to this commit:
> >>>>>   /sys/devices/system/memory/memory0# time echo 0 > online
> >>>>>   -bash: echo: write error: Device or resource busy
> >
> > Well, that means offline didn't actually work for that block even before
> > this patch, right? Is it even a movable_node block? I guess not?
> 
> Correct. It should fail.
> 
> >>>>> After:
> >>>>>   /sys/devices/system/memory/memory0# time echo 0 > online
> >>>>>   -bash: echo: write error: Device or resource busy
> >>>>>   
> >>>>>   real	2m0.009s
> >>>>>   user	0m0.000s
> >>>>>   sys	1m25.035s
> >>>>>
> >>>>> There's no way that block can be removed, it contains the kernel text,
> >>>>> so it should instantly fail - which it used to.
> >
> > Ah, right. So your complain is really about that the failure is not
> > instant anymore for blocks that can't be offlined.
> 
> Yes. Previously it failed instantly, now it doesn't fail, and loops
> infinitely (once the 2 minute limit is removed).

Yeah it failed only because the migration code retried few times and we
bailed out which is wrong as well. I will send two patches as a reply to
this email.

> >> This is really strange! As you write in other email the page is
> >> reserved. That means that some of the earlier checks 
> >> 	if (zone_idx(zone) == ZONE_MOVABLE)
> >> 		return false;
> >> 	mt = get_pageblock_migratetype(page);
> >> 	if (mt == MIGRATE_MOVABLE || is_migrate_cma(mt))
> >
> > The MIGRATE_MOVABLE check is indeed bogus, because that doesn't
> > guarantee there are no unmovable pages in the block (CMA block OTOH
> > should be a guarantee).
> 
> OK I'll try that and get back to you.

Thanks!
-- 
Michal Hocko
SUSE Labs

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

^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2017-11-14  7:45 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <AM3PR04MB14892A9D6D2FBCE21B8C1F0FF12B0@AM3PR04MB1489.eurprd04.prod.outlook.com>
2017-11-13  7:33 ` [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages Ran Wang
2017-11-13 11:02   ` Michal Hocko
2017-11-14  6:10     ` Ran Wang
2017-11-14  7:06       ` Michal Hocko
2017-11-14  7:45         ` Ran Wang
2017-10-13 11:58 [PATCH 1/2] mm, memory_hotplug: do not fail offlining too early Michal Hocko
2017-10-13 12:00 ` [PATCH 1/2] mm: drop migrate type checks from has_unmovable_pages Michal Hocko
2017-10-17 11:41   ` Michael Ellerman
2017-10-17 12:03     ` Michal Hocko
2017-10-17 13:02   ` Vlastimil Babka
2017-10-19  2:51   ` Joonsoo Kim
2017-10-19  7:15     ` Michal Hocko
2017-10-19  7:33       ` Joonsoo Kim
2017-10-19  8:20         ` Michal Hocko
2017-10-19 12:21           ` Michal Hocko
2017-10-20  2:13             ` Joonsoo Kim
2017-10-20  5:59               ` Michal Hocko
2017-10-20  6:50                 ` Joonsoo Kim
2017-10-20  7:02                   ` Michal Hocko
2017-10-23  5:23                     ` Joonsoo Kim
2017-10-23  8:10                       ` Michal Hocko
2017-10-24  4:44                         ` Joonsoo Kim
2017-10-24  7:44                           ` Michal Hocko
2017-10-24  8:12                           ` Vlastimil Babka
2017-10-24 12:25                             ` Michal Hocko
2017-10-26  2:47                             ` Joonsoo Kim
2017-10-26  7:41                               ` Michal Hocko
2017-10-20  7:22               ` Xishi Qiu
2017-10-20  8:17                 ` Michal Hocko
2017-10-23  5:26                   ` Joonsoo Kim
2017-10-26 13:04             ` Vlastimil Babka
2017-10-26 13:59             ` Michal Hocko

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