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=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY, USER_AGENT_SANE_1 autolearn=ham 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 3E0EBC33C9E for ; Wed, 15 Jan 2020 01:24:32 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id C875A24658 for ; Wed, 15 Jan 2020 01:24:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C875A24658 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 6551F8E0005; Tue, 14 Jan 2020 20:24:31 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6053F8E0003; Tue, 14 Jan 2020 20:24:31 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4F3768E0005; Tue, 14 Jan 2020 20:24:31 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0249.hostedemail.com [216.40.44.249]) by kanga.kvack.org (Postfix) with ESMTP id 3A8378E0003 for ; Tue, 14 Jan 2020 20:24:31 -0500 (EST) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id EC7E38248D51 for ; Wed, 15 Jan 2020 01:24:30 +0000 (UTC) X-FDA: 76378123500.23.spoon58_4461e8b54125a X-HE-Tag: spoon58_4461e8b54125a X-Filterd-Recvd-Size: 3377 Received: from out30-57.freemail.mail.aliyun.com (out30-57.freemail.mail.aliyun.com [115.124.30.57]) by imf41.hostedemail.com (Postfix) with ESMTP for ; Wed, 15 Jan 2020 01:24:29 +0000 (UTC) X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R211e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04427;MF=yang.shi@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0Tnlf4Gq_1579051463; Received: from US-143344MP.local(mailfrom:yang.shi@linux.alibaba.com fp:SMTPD_---0Tnlf4Gq_1579051463) by smtp.aliyun-inc.com(127.0.0.1); Wed, 15 Jan 2020 09:24:26 +0800 Subject: Re: [PATCH 2/2] mm/mempolicy: Skip walking HUGETLB vma if MPOL_MF_STRICT is specified alone To: Mike Kravetz , Li Xinhai , "linux-mm@kvack.org" Cc: akpm , mhocko , n-horiguchi References: <1578993378-10860-1-git-send-email-lixinhai.lxh@gmail.com> <1578993378-10860-2-git-send-email-lixinhai.lxh@gmail.com> <2020011422092314671410@gmail.com> From: Yang Shi Message-ID: <7c26d332-c40a-0271-b408-a2079ab00808@linux.alibaba.com> Date: Tue, 14 Jan 2020 17:24:22 -0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US 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 1/14/20 5:07 PM, Mike Kravetz wrote: > On 1/14/20 6:09 AM, Li Xinhai wrote: >> Add cc to >> Yang Shi >> Naoya Horiguchi >> , who has been worked on this part >> >> On 2020-01-14 at 17:16 Li Xinhai wrote: >>> Checking MPOL_MF_STRICT is ignored for HUGETLB vma according to mbind man >>> page: >>> >>> Notes >>> MPOL_MF_STRICT is ignored on huge page mappings. >>> >>> If MPOL_MF_STRICT is specified alone without any MOVE flag, we should >>> indicate, from test_walk, that walking this vma should be skipped even if >>> there are misplaced pages. >>> >>> Signed-off-by: Li Xinhai >>> Cc: Michal Hocko >>> Cc: Mike Kravetz > I do not necessarily disagree with the change. However, this has made me > question a couple things: > 1) Why does the man page say MPOL_MF_STRICT is ignored on huge page mappings? > - Is that leftover from the the days when huge page migration was not > supported? > - Is it just because huge page migration is more likely to fail than > base page migration. > 2) Does the mbind code function properly when unable to migrate a huge page > MPOL_MF_STRICT is set? A quick look at the code looks like it returns > EIO. I don't know the answer about question #1 I didn't dig into the history. The queue_pages_hugetlb() returns 0 unconditionally, I think this is what "MPOL_MF_STRICT is ignored on huge page mappings" means in code. It would return -EIO for base pages or THP as what the manpage describes. > > I will look into these questions. However, if someone already knows the > answer that would be appreciated.