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=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,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 9FC5BC33CAF for ; Thu, 23 Jan 2020 16:56:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 70263214AF for ; Thu, 23 Jan 2020 16:56:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 70263214AF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 084F36B0003; Thu, 23 Jan 2020 11:56:57 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 035FC6B0006; Thu, 23 Jan 2020 11:56:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8DF66B0007; Thu, 23 Jan 2020 11:56:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0169.hostedemail.com [216.40.44.169]) by kanga.kvack.org (Postfix) with ESMTP id CD4A06B0003 for ; Thu, 23 Jan 2020 11:56:56 -0500 (EST) Received: from smtpin01.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 6FB3D1F10 for ; Thu, 23 Jan 2020 16:56:56 +0000 (UTC) X-FDA: 76409503632.01.soap79_59a614143320b X-HE-Tag: soap79_59a614143320b X-Filterd-Recvd-Size: 2627 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf23.hostedemail.com (Postfix) with ESMTP for ; Thu, 23 Jan 2020 16:56:55 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 14AB0AC50; Thu, 23 Jan 2020 16:56:53 +0000 (UTC) Date: Thu, 23 Jan 2020 17:56:51 +0100 From: Michal Hocko To: Li Xinhai Cc: linux-mm@kvack.org, akpm@linux-foundation.org, Mike Kravetz , Anshuman Khandual , Naoya Horiguchi Subject: Re: [PATCH v5] mm/mempolicy: Checking hugepage migration is supported by arch in vma_migratable Message-ID: <20200123165651.GL29276@dhcp22.suse.cz> References: <1579786179-30633-1-git-send-email-lixinhai.lxh@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1579786179-30633-1-git-send-email-lixinhai.lxh@gmail.com> 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 Thu 23-01-20 13:29:39, Li Xinhai wrote: > vma_migratable() is called to check if pages in vma can be migrated > before go ahead to further actions. Currently it is used in below code > path: > - task_numa_work > - mbind > - move_pages > > For hugetlb mapping, whether vma is migratable or not is determined by: > - CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION > - arch_hugetlb_migration_supported > > Issue: current code only checks for CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION > alone, and no code should use it directly. (note that current code in > vma_migratable don't cause failure or bug because > unmap_and_move_huge_page() will catch unsupported hugepage and handle it > properly) > > This patch checks the two factors by hugepage_migration_supported for > impoving code logic and robustness. It will enable early bail out of > hugepage migration procedure, but because currently all architecture > supporting hugepage migration is able to support all page size, we would > not see performance gain with this patch applied. > > vma_migratable() is moved to mm/mempolicy.c, because of the circular > reference of mempolicy.h and hugetlb.h cause defining it as inline not > feasible. > > Signed-off-by: Li Xinhai > Cc: Michal Hocko > Cc: Mike Kravetz > Cc: Anshuman Khandual > Cc: Naoya Horiguchi Acked-by: Michal Hocko Thanks! -- Michal Hocko SUSE Labs