lkml.org 
[lkml]   [2018]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Infinite looping observed in __offline_pages
On Wed 22-08-18 11:58:02, Mike Kravetz wrote:
> On 08/22/2018 02:30 AM, Aneesh Kumar K.V wrote:
[...]
> > diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c
> > index 4eb6e824a80c..f9bdea685cf4 100644
> > --- a/mm/memory_hotplug.c
> > +++ b/mm/memory_hotplug.c
> > @@ -1338,7 +1338,8 @@ static unsigned long scan_movable_pages(unsigned long start, unsigned long end)
> > return pfn;
> > if (__PageMovable(page))
> > return pfn;
> > - if (PageHuge(page)) {
> > + if (IS_ENABLED(CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION) &&
> > + PageHuge(page)) {
>
> How about using hugepage_migration_supported instead? It would automatically
> catch those non-migratable huge page sizes. Something like:
>
> if (PageHuge(page) &&
> hugepage_migration_supported(page_hstate(page))) {

Ohh, definitely, this is much better.
--
Michal Hocko
SUSE Labs

\
 
 \ /
  Last update: 2018-08-23 09:26    [W:0.051 / U:0.780 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site