From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDB82C33C9E for ; Wed, 15 Jan 2020 01:25:08 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7FF2524679 for ; Wed, 15 Jan 2020 01:25:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="sp8CqYSd" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7FF2524679 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 25CFB8E0006; Tue, 14 Jan 2020 20:25:08 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 20D1B8E0003; Tue, 14 Jan 2020 20:25:08 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 123C38E0006; Tue, 14 Jan 2020 20:25:08 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0058.hostedemail.com [216.40.44.58]) by kanga.kvack.org (Postfix) with ESMTP id F11E08E0003 for ; Tue, 14 Jan 2020 20:25:07 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with SMTP id AFB791F1F for ; Wed, 15 Jan 2020 01:25:07 +0000 (UTC) X-FDA: 76378125054.23.seat07_49d6e95b2795a X-HE-Tag: seat07_49d6e95b2795a X-Filterd-Recvd-Size: 2776 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf24.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 01:25:07 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 551DC24658; Wed, 15 Jan 2020 01:25:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1579051506; bh=jTg5v3skvtc7Isg1RolmyEKrAtrgbw2zV07kCrlvJm0=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=sp8CqYSdqvUtShwKblcL5eDvOcBk13Dx/R9iQc+AuYhh5He9Nx63TFGhea3A5NflD /hL23YWxIV8CjuZSwcRiTrxaUtAJB0KtMqs2e5COVJHs0HogT2w74nv3OtC25Pe4+u ArM72s06wNY7hBTBSqfHD6u6ffhPbhx7PKrORwfY= Date: Tue, 14 Jan 2020 17:25:05 -0800 From: Andrew Morton To: Li Xinhai Cc: linux-mm@kvack.org, Michal Hocko , Mike Kravetz Subject: Re: [PATCH 1/2] mm/mempolicy: Checking hstate for hugetlbfs page in vma_migratable Message-Id: <20200114172505.3e4391c9ae9b949a1a90e78b@linux-foundation.org> In-Reply-To: <1578993378-10860-1-git-send-email-lixinhai.lxh@gmail.com> References: <1578993378-10860-1-git-send-email-lixinhai.lxh@gmail.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Tue, 14 Jan 2020 09:16:17 +0000 Li Xinhai wrote: > Checking hstate at early phase when isolating page, instead of during > unmap and move phase, to avoid useless isolation. > > ... > > --- a/include/linux/mempolicy.h > +++ b/include/linux/mempolicy.h > @@ -185,10 +185,9 @@ static inline bool vma_migratable(struct vm_area_struct *vma) > if (vma_is_dax(vma)) > return false; > > -#ifndef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION > - if (vma->vm_flags & VM_HUGETLB) > + if (is_vm_hugetlb_page(vma) && > + !hugepage_migration_supported(hstate_vma(vma))) > return false; > -#endif > > /* > * Migration allocates pages in the highest zone. If we cannot x86_64 allmodconfig: In file included from ./include/linux/hugetlb.h:26:0, from arch/x86/mm/fault.c:15: ./include/linux/mempolicy.h: In function vma_migratable: ./include/linux/mempolicy.h:190:4: error: implicit declaration of function hugepage_migration_supported; did you mean thp_migration_supported? [-Werror=implicit-function-declaration] !hugepage_migration_supported(hstate_vma(vma))) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ the obvious fix didn't work.