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=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 51BCCC33CB1 for ; Thu, 16 Jan 2020 15:18:06 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 2D6F720730 for ; Thu, 16 Jan 2020 15:18:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D6F720730 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 B44DE8E0075; Thu, 16 Jan 2020 10:18:05 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ACD988E003F; Thu, 16 Jan 2020 10:18:05 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9BCB28E0075; Thu, 16 Jan 2020 10:18:05 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0189.hostedemail.com [216.40.44.189]) by kanga.kvack.org (Postfix) with ESMTP id 82E9E8E003F for ; Thu, 16 Jan 2020 10:18:05 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with SMTP id 49F561F1D for ; Thu, 16 Jan 2020 15:18:05 +0000 (UTC) X-FDA: 76383852930.23.fly36_80c7e1082fe3f X-HE-Tag: fly36_80c7e1082fe3f X-Filterd-Recvd-Size: 2325 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf34.hostedemail.com (Postfix) with ESMTP for ; Thu, 16 Jan 2020 15:18:04 +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 85C2669DE8; Thu, 16 Jan 2020 15:18:03 +0000 (UTC) Date: Thu, 16 Jan 2020 16:18:03 +0100 From: Michal Hocko To: Li Xinhai Cc: "linux-mm@kvack.org" , akpm , Mike Kravetz Subject: Re: [PATCH v4] mm/mempolicy,hugetlb: Checking hstate for hugetlbfs page in vma_migratable Message-ID: <20200116151803.GV19428@dhcp22.suse.cz> References: <1579147885-23511-1-git-send-email-lixinhai.lxh@gmail.com> <20200116095614.GO19428@dhcp22.suse.cz> <20200116215032206994102@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20200116215032206994102@gmail.com> User-Agent: Mutt/1.12.2 (2019-09-21) Content-Transfer-Encoding: quoted-printable 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 16-01-20 21:50:34, Li Xinhai wrote: > On 2020-01-16=A0at 17:56=A0Michal Hocko=A0wrote: > >On Thu 16-01-20 04:11:25, Li Xinhai wrote: > >> Checking hstate at early phase when isolating page, instead of durin= g > >> unmap and move phase, to avoid useless isolation. > > > >Could you be more specific what you mean by isolation and why does it > >matter? The patch description should really explain _why_ the change i= s > >needed or desirable.=20 >=20 > The changelog can be improved: >=20 > vma_migratable() is called to check if pages in vma can be migrated > before go ahead to isolate, unmap and move pages. For hugetlb pages, > hugepage_migration_supported(struct hstate *h) is one factor which > decide if migration is supported. In current code, this function is cal= led > from=A0unmap_and_move_huge_page(), after isolating page has > completed. > This patch checks hstate from vma_migratable() and avoids isolating pag= es > which are not supported. This still explains what but not why this is relevant. If by isolating pages you mean isolate_lru_page then this really a noop for hugetlb pages. Or do I still misread your changelog? --=20 Michal Hocko SUSE Labs