Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1312476imm; Thu, 23 Aug 2018 00:31:07 -0700 (PDT) X-Google-Smtp-Source: AA+uWPzv8m1Vj00f6VHq9XgqaZCSFWsGZ+eeforn6MlogDNW88yYM2qj8J8/iJ+fsWS+uAX/GdmX X-Received: by 2002:a62:4255:: with SMTP id p82-v6mr61715191pfa.238.1535009467825; Thu, 23 Aug 2018 00:31:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535009467; cv=none; d=google.com; s=arc-20160816; b=PUjHXmvFVFVJpsM3mpBTiymCJqA7gykH20qFc83G8SyjKANFbGSZFB6LmYdHD/QHRW hJj4sFzafItbtA6TdidYf9KFRF4cuBc4RKf03eN4DJwplkYZNsIFlljCrJfCNZGGUKdT ULUlIgiddbsWJyfuk164aYMWFV0uc+BTAm72718rO9sTEQcF9cp8oVMlt8HgzNz5TYBq 8OWTISDcjAf3L7BfB4I/VgTuqcDLKjtx9kKIfB5fNtdq/7AjVw+dQBLmo+g7J1+Yhpo+ SUdo4oGx8Zym+8qnGu4EsdVoiuDg9P3gkz6TwZwqgIz8AOe81eTsXmB/m2VsrzemkvR3 seVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=ThdDgDgku1PlKUHhyWd5RuLJ00TRE6RbBtUVr2/DVQo=; b=B2jb5CoyXKs8DjfYOucxlvbEhHtyluEdbkFXYj3EVpymSliXKFy40hESLqaqAnDPWg 3Jkklz3Duc1JlnCS4dFCGpWUaEM4QqeZDCO49G2F92LiX9BbbJD+Pw+UyeX+0CJvBrXK dEwSrOl8qbRt3oQm9qSpm6eS54hUcFZGtvScpP4GMLzBV5GYWF9P8cwIZ2O1DVZGI9x7 FBlu1JGg8t0HGksrUNGGwPwVAzyOCq0GhcOJxmdmdxHOekf3F2XEHnrt8hYFEp7WNjVk YOeNGB+C7g3nY0rZLFA0IhcxIAZMv+n34r7TExHvWHGPSk88jps8P/tSE3kw+oUEEQP8 bstQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12-v6si4079760pfd.254.2018.08.23.00.30.29; Thu, 23 Aug 2018 00:31:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726799AbeHWKyB (ORCPT + 99 others); Thu, 23 Aug 2018 06:54:01 -0400 Received: from mx2.suse.de ([195.135.220.15]:46438 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726144AbeHWKyA (ORCPT ); Thu, 23 Aug 2018 06:54:00 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id DBC15AEA8; Thu, 23 Aug 2018 07:25:43 +0000 (UTC) Date: Thu, 23 Aug 2018 09:25:43 +0200 From: Michal Hocko To: Mike Kravetz Cc: "Aneesh Kumar K.V" , Haren Myneni , n-horiguchi@ah.jp.nec.com, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, kamezawa.hiroyu@jp.fujitsu.com, mgorman@suse.de Subject: Re: Infinite looping observed in __offline_pages Message-ID: <20180823072543.GS29735@dhcp22.suse.cz> References: <20180725181115.hmlyd3tmnu3mn3sf@p50.austin.ibm.com> <20180725200336.GP28386@dhcp22.suse.cz> <87bm9ug34l.fsf@linux.ibm.com> <54c72a22-a921-fc64-460d-f66985d0df4e@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54c72a22-a921-fc64-460d-f66985d0df4e@oracle.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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