Received: by 2002:a05:6358:4e97:b0:b3:742d:4702 with SMTP id ce23csp1222650rwb; Thu, 11 Aug 2022 19:00:15 -0700 (PDT) X-Google-Smtp-Source: AA6agR5DBOcRVLCyd2kJIe2dDPKsPu4sAoIp+7iLZJK9my/lzgmKYlRXPQtUT6aMRoaYnl56SgnO X-Received: by 2002:a17:90b:1b01:b0:1f7:3e2c:7ea7 with SMTP id nu1-20020a17090b1b0100b001f73e2c7ea7mr11490101pjb.59.1660269615126; Thu, 11 Aug 2022 19:00:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1660269615; cv=none; d=google.com; s=arc-20160816; b=tDSgQkkb8vlZOhKJMshcmUnygj2P2OKA8v2v6FlAZclcKtTByMMcEHNZyyJyhx0I9z fY1baczYYhgOBVso94QYl/aqDsQGFrhCsN1UEqhK4PPqe1w0kRYHLdhUepwz6u/OaqWZ tvdHFQIop8AONQ8m54R7oNukIi9m1hWIrZNAwQf5FzH4GjPCM1fZNGi+IKsWOKPN3u0y BLd12vlRGZMNGcwRc/ysVGEWsMqYe2bIRWNx9foG4MQW0TjDnaKYrAnJnwSO1nNNzafy qYjOzbsKjjVLMFbsO5WFGdCECtGT+Qpba9ITZKiZhoPQd9WewrVCmi8cDcRCqQ+drTWP 9uDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject; bh=PIFRhB1+DXeHF7IbaK711iPzWr0/9zSdQi96yqZMYbc=; b=GYZ+KWXhIpWJw061HxfUJmG+CvW1j8a9Do5HpZCjurSYcgQAGol3fVM3y0KGKfXqnS L9Um27zYUoma+zNA9gyZWOFfJjCNN2Ewj7l+nzx6bVt1ZDzs/f/VRSTEnwwiEWzuZVDv jSFHFN2MVJNzHKG0KAUjRXI7s5+bZDVu4ZHBEhc3HiWc4gP6m9e9ng0UCbXdjOFmbmHh ExlbdKlK6DMTkl2jBrz+yWRRHRCYpqaxgwezJLhfoQ7sbi06hVwHnhei8jRglEyJ0eyS zD8/f1eqECl6416OeW6WtJISQ2y9LEkACCDxR0eDxf5nZ48eb+DJ3f63gZkQh2pVqUID 42ZQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f22-20020a056a00239600b0052eb0d3a27fsi954869pfc.157.2022.08.11.19.00.01; Thu, 11 Aug 2022 19:00:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236225AbiHLB7S (ORCPT + 99 others); Thu, 11 Aug 2022 21:59:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229516AbiHLB7Q (ORCPT ); Thu, 11 Aug 2022 21:59:16 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CDA9A1D6B for ; Thu, 11 Aug 2022 18:59:15 -0700 (PDT) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.56]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4M3myC0WVrzmVbl; Fri, 12 Aug 2022 09:57:07 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 12 Aug 2022 09:59:12 +0800 Subject: Re: Linux 5.19 __NR_move_pages failed for hugepage To: "Wang, Haiyue" CC: "akpm@linux-foundation.org" , Linux-MM , linux-kernel , Naoya Horiguchi , David Hildenbrand References: From: Miaohe Lin Message-ID: Date: Fri, 12 Aug 2022 09:59:12 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="windows-1252" Content-Language: en-US Content-Transfer-Encoding: 8bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2022/8/11 16:01, Wang, Haiyue wrote: > Hi Miaohe, > > ? Hi Haiyue, Many thanks for your report and debug. > > When I call ?*syscall (__NR_move_pages, 0, n_pages, ptr, 0, status, 0)*? to get the huge page node > > information, it is failed with ?-2? returned in ?status? array. > > ? > > After some debug, I found that ?*follow_huge_pud*? will return NULL if ?*FOLL_GET*? is set. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=e66f17ff71772b209eed39de35aaa99ba819c93d > > ? > > This will make your patch doesn?t work for huge page. > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4cd614841c06338a087769ee3cfa96718784d1f5 > Supporting of ?*FOLL_GET*? in follow_huge_pud is introduced via the below commit: https://lore.kernel.org/all/20220714042420.1847125-9-naoya.horiguchi@linux.dev/T/#mb3c83df087fba454b7b4ea32227fb8775ca70081 But that's still not perfect yet. For s390 version of follow_huge_pud, FOLL_GET is still not supported. And pgd level hugepage doesn't support FOLL_GET now. > ? > > Not sure you know this issue or not, just share my debug information. I'm not sure whether it's better to revert my above "problematic" patch first then add it back when all hugetlb pages support FOLL_GET. Or we could just live with it? Any thoughts? Thanks, Miaohe Lin > > ? > > BR, > > Haiyue > > ? >