Received: by 2002:ac8:5491:0:b0:40f:fb00:664b with SMTP id h17csp629084qtq; Thu, 10 Aug 2023 11:01:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGidJGkqTVKKfNmQNNvRvJtg6KtbzWpEJ4dZtj736mD6JnhXrsMasPG4WN9ISAuMJ3h71s4 X-Received: by 2002:a17:90a:4bc8:b0:268:fb85:3b2 with SMTP id u8-20020a17090a4bc800b00268fb8503b2mr2536151pjl.7.1691690501116; Thu, 10 Aug 2023 11:01:41 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1691690501; cv=pass; d=google.com; s=arc-20160816; b=j20vOU/yVJnNL8bTrh/AmqZ71yqfv26qHIQAokukHu7B6Z8vdkzYVpmEEzhFw8TRx9 anWFRvPt9zpvmNJQoiqBTHl0mqHhsyR+sBbVkUbs7W4FsM35NnZ5z/K53+Ab6HdoG0bF P0LoxzvO5yv/Nm+e3yCd/x2YZ8DBxXlrQEPU6Ev3ftfEipCbcXwSq0Re8XfG8NOYK7ch 36CmA5kax/88KaAnb/YftFeZPfMj3LkJEYUt6qQFXvcjNvDR470szpA2V7cNXfuXq5Cn AGO3b5UdaT+r3W6OcqH5InCSX3NcfkcInpX7Jcc1xRW70sixjj7Ydj/ZhVSqVYBXZi7p Q4kA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to :content-transfer-encoding:content-disposition:references:message-id :subject:cc:to:from:date:dkim-signature:dkim-signature; bh=d9GdrhYZyNYcwTQxeij7WrO1HBErK4cxrKaGo8wHFTU=; fh=g0fGWg9uDdlIYdsKKU48fVRWUdSOe3RZXM7mP4+a8Pk=; b=QT/5ijq+99GiTPbfcWKkWs/Th9LbedL1Nw/7PXqnIiZBmpWyfuJVscOcrN5hNlQtyL 2oBGKcrbiZ0ivFGIfE83Vj/iFisttxtAhlqEv1BgBTizE5Xx+jI+IEnZ/v+adG7C4Nfo XavO71vr53fEWc7b++UYzErgWAkzIl1HZiupu9Tl6HRlQCa3h/fTEsEfUj7tiuKbigrv swW2T7ZjK/4FTU0J42UTk3F7GAtvpCKF0v20LyjEQMRk71Zu5r1gJDSt42fSpptanrAg J6aZF7lCcC6VnNtJDbUpjL9qZGBX/JePUAvzMs5Xxk34Zmsb8j8GBzbXuC0NZL4e0Ije 7u3Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=0t0lWZYZ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=c7ThhTH9; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 14-20020a17090a08ce00b00262d9b8a137si3941391pjn.98.2023.08.10.11.01.28; Thu, 10 Aug 2023 11:01:41 -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; dkim=pass header.i=@oracle.com header.s=corp-2023-03-30 header.b=0t0lWZYZ; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=c7ThhTH9; arc=pass (i=1 spf=pass spfdomain=oracle.com dkim=pass dkdomain=oracle.com dmarc=pass fromdomain=oracle.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=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233824AbjHJQ3y (ORCPT + 99 others); Thu, 10 Aug 2023 12:29:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231426AbjHJQ3x (ORCPT ); Thu, 10 Aug 2023 12:29:53 -0400 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B800BA8 for ; Thu, 10 Aug 2023 09:29:51 -0700 (PDT) Received: from pps.filterd (m0246632.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 37AGOMAd014556; Thu, 10 Aug 2023 16:29:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : content-type : content-transfer-encoding : in-reply-to : mime-version; s=corp-2023-03-30; bh=d9GdrhYZyNYcwTQxeij7WrO1HBErK4cxrKaGo8wHFTU=; b=0t0lWZYZb8cvJxzUi5joJBEfeM+5HlxkOsFDakN7vy2IhUMwSSPjGb9d1oyKGYuy035L pcDDrQ2b9D2eyFYVQJ0y+mt+4gRp18/cW7yKFNFHg8bEkKxfjGbLUydVw0bDcpi5xzhW lK+gW8ZQfPKmyjp+HypcvUc6dbOmtXxRkltdnsLNlHDQHbzpsitqTCpulOk83/kWAnlh lbOxdzqs65J2RsnTsZf0l9wYhjDCEM6JN/hRznhZZShAn8W9kbs2ZfVAMSes1CaesQyz HMJVLN/5CbkEqfN+gCQG3A5jhcGURoi5kihwLOz+oMRTUHrV4UYmjMD9+Xfe1ScU/FYb vw== Received: from phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (phxpaimrmta01.appoci.oracle.com [138.1.114.2]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3s9e1ubj72-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Aug 2023 16:29:27 +0000 Received: from pps.filterd (phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com [127.0.0.1]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 37AGJmHI008835; Thu, 10 Aug 2023 16:29:26 GMT Received: from nam04-mw2-obe.outbound.protection.outlook.com (mail-mw2nam04lp2176.outbound.protection.outlook.com [104.47.73.176]) by phxpaimrmta01.imrmtpd1.prodappphxaev1.oraclevcn.com (PPS) with ESMTPS id 3s9cv8q4b2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 10 Aug 2023 16:29:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Fz7Yo6zN58F4IgKU6/dL5Chr/sPYvTh7f8baWdO92ymmpm99tiLLWbn67ZhtRV5WqeNNorZkWY5pi9TTo1hGeB0SYZuHF4q0kofZmBxyJbQ7CvvMft9V90cHa2uqxcGNIhofPqq0P+oipTSXpDTf9vdDT4BCHA6THRngGsYt6y3+vh0nLiFQyeYwbuab8dMYvob9f4voiX9QSX6ZCztHzsQSIuDaJGpMTDUWsIzs4qtPwayVjNt8luhGyFI6yrCgddOzqDcHkmqQpmuAW5aN9j3QccevNwkYiPKF6g+RrDxwNDKnEBTpFYTgYEJukRhgtYh3buxcerBKYzOMffwzaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=d9GdrhYZyNYcwTQxeij7WrO1HBErK4cxrKaGo8wHFTU=; b=CMTrYXCt45IXMTV1efZMCnNWF1vk6DfuGvg+ky73fypWFwUpH1yPivoAEXlU410wpVeW78x1Q0R3Rt1zvYTgnJRNhlnbkSlkZmDZ+Jlvfax7jElq7vSOVemxwHV3K3T+2/A9Yttevn0htwl763QUmu5HJt4M6yS1PLhjVBYHv9CvMib4jCa0JYJwlKWJART+iOC7JwipMiYUDVsWEzWtUfWBmQK324Rv4ZnaMoD44XbORJXKsj1etKZPiBVwT04c+vTQ4K47LXzW8c+8i7tS4p+XeGGJZISaiwzWg1Yd23V0JiNToe+c+fZL2zpuqs+uFbh12ywkxaJD68ybygoNTg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=d9GdrhYZyNYcwTQxeij7WrO1HBErK4cxrKaGo8wHFTU=; b=c7ThhTH9L/LJI23PhrND5GAkclGabI3BEEsZPKmAkWEL1UJdGYpCJDlERY3rLJEimSZQu7JnxJvxxbK7u/wmbsqnI2xr8216coQAe2+oJUMC5VCESEVmMENalnsqop1lcq3ix6O34bqEt2ffX6BmpIp/B2xyN/IhuXSBASxcDBM= Received: from BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) by IA1PR10MB5899.namprd10.prod.outlook.com (2603:10b6:208:3d5::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.30; Thu, 10 Aug 2023 16:29:24 +0000 Received: from BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::92ea:33e7:fb66:c937]) by BY5PR10MB4196.namprd10.prod.outlook.com ([fe80::92ea:33e7:fb66:c937%7]) with mapi id 15.20.6652.029; Thu, 10 Aug 2023 16:29:23 +0000 Date: Thu, 10 Aug 2023 09:29:20 -0700 From: Mike Kravetz To: Kefeng Wang Cc: Zi Yan , Naoya Horiguchi , Matthew Wilcox , Andrew Morton , linux-mm@kvack.org, linux-kernel@vger.kernel.org, Huang Ying , David Hildenbrand Subject: Re: [PATCH 1/4] mm: migrate: use a folio in add_page_for_migration() Message-ID: <20230810162920.GA4734@monkey> References: <5BBFF5D3-3416-4C0E-9FDD-655661657D67@nvidia.com> <20230809205316.GA3537@monkey> <20230809224424.GB3537@monkey> <2da95492-079b-43b1-a950-d290984a21c0@huawei.com> Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <2da95492-079b-43b1-a950-d290984a21c0@huawei.com> X-ClientProxiedBy: MW4PR04CA0297.namprd04.prod.outlook.com (2603:10b6:303:89::32) To BY5PR10MB4196.namprd10.prod.outlook.com (2603:10b6:a03:20d::23) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY5PR10MB4196:EE_|IA1PR10MB5899:EE_ X-MS-Office365-Filtering-Correlation-Id: c4f8903f-5ee7-4f65-9929-08db99bef4fd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MJSMTTFe6mgf36AWcAZJEu1xqrTUMwDZ5/SoFiTIo1X1hWeVTQL6Onu++ms0JbcTfyanmzzxuhUC4MqZ8JuRVtmVvcN5wr+pvBbwu1GNhua+UoTmVhDm4z3pwVngO/gQps2qipbUlsdbKMZqng0YSdGCHR2VCDZWbT0yMSLbdyFSBpdAAl+wuFLC9vMY4sbkGaUkgbx7W3xSdylFgP/owg35pZo+DuEgK/O5YgtFqkrr+RONPyGzRmy6REfJjq65nHOnjnwNCfXnU3/GjRGK0Yt8vX7N0jpUJYPxfS4ZOqeSE6WqF7Z/Ha1/0lEPkQrKR5AwP7Kfz5viveMHs+lMFrp8pmhdbBbeZS4V/PnntPFyT1V2GMRBhNrG3awVzNjcmKeUl8XsQmwu25So4P0gBV1LoLyIHaBYHeSddmziR3t2i5r9JcXnvCG58FwM8WkLc+OTwxf71UleeCUAAkA3kJ+aRIoJQEtZLkMaGuOr6avR52mvGuXkSi0LzMGllE4Re9IrPjJkhKIP0XcEfMCUY4KzKoXanw6U3R213w5hQUCE9siuVac9/9rOQ2s7TXWS X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BY5PR10MB4196.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(7916004)(39860400002)(396003)(376002)(136003)(366004)(346002)(186006)(1800799006)(451199021)(5660300002)(316002)(4326008)(6916009)(66946007)(54906003)(38100700002)(8936002)(8676002)(86362001)(41300700001)(478600001)(2906002)(66476007)(66556008)(44832011)(83380400001)(66899021)(6486002)(33656002)(33716001)(6512007)(9686003)(26005)(1076003)(53546011)(6506007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NzNUVFlLbUdHTUlYcEorZ0p5U3FNYzRWQ2llSEpyVmNVNUxxWWRjWHFUOWFG?= =?utf-8?B?VzYrcmV3UjgxS3Q1dlMzQUN3WXNaa0JyNDVIUFVPUm5sNnluRDE2dG1kbmYv?= =?utf-8?B?bmZwRGx6NVFMV2F2UkpoMGt3S3N6Q3ZrZHpNMkpmUThKTkhZUS9KdzZxbVVp?= =?utf-8?B?dHhCYkZVRXVJTC9vbUkrRnJOSmw4KytLVE1ZK0FIemIrUEpFeVVMWllQUlBw?= =?utf-8?B?TERVZXp6dFRQdVFESzVlNmtYdmNrb3FLVE1rbGNveGRKYkhDaFk2Y0tERlVJ?= =?utf-8?B?b0k4QURpVExjaFJia3M2UE1jRkloT3UwcENscHVDV1hzR1c4djltdEs2WkRO?= =?utf-8?B?eFBLZW5GWXhFcHJYTm1NNi9ITGljQWs5dGRycCtlRnNaZ21UMThMNk9LRUs3?= =?utf-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Z0UjNESW93blBlbTc0VVhVNi81UmlLeklTU2hUVGpKNHA1WjV5aVJ1?= =?utf-8?B?dXRjWlNIYjdWcFUvRXcyazVPQ1dTQVFmU2QyTmlGTnZCMmVqMEw3KzZ6TktW?= =?utf-8?B?ajJNb0V1dEJMaWdXN2ZHaVFISC83RnpXclFRMjJJMk9URDgvWWtxVXR2TGtt?= =?utf-8?B?aUFuOHFORkFxOGg5eGVzQ0hSMzd3TlZsUEE1YTJ2SE00SjZEdWMzdTFqOWQ2?= =?utf-8?B?Q2FNTXFaWmtmdXBJdjFYWGZ2OFJRRytLVjl0M2t3NGtVQ3dmNEp4ZDN0Mm9L?= =?utf-8?B?bThMa2JDMmsxNTlXc1VTV3JlYUVnWjdaTm5qNUx1MWxvK1lJOVQ4YTJYNldV?= =?utf-8?B?NkZYQnRRcklIcXVkSUs4eHRDdFFkWDYrNTZCVzJZa01PWXlXakZmSndzdWt3?= =?utf-8?B?NkRJaC9WZnJuaWNxcENxTzQ5aFZVam9qQmplYVhIbjcwc3lITnpIWTBZeHVL?= =?utf-8?B?NkZ1M1BYYlFVWnRCUG9rMnpJa0REU0RmcnA5STVSTS9sTEc3ako2T3dPRmJv?= =?utf-8?B?emZaYzJUYU8vR1E9PQ==?= X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: c4f8903f-5ee7-4f65-9929-08db99bef4fd X-MS-Exchange-CrossTenant-AuthSource: BY5PR10MB4196.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2023 16:29:23.8396 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: mS/gT3TFv2AqkZqq1jBajoAstd17TJvLVWMe9LZc0LCtdZnVchwGwBZO+M9paRmF/uaE7ZhFUwp9EihandLLhQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR10MB5899 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.267,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-08-10_14,2023-08-10_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 adultscore=0 bulkscore=0 phishscore=0 malwarescore=0 mlxlogscore=999 suspectscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2306200000 definitions=main-2308100141 X-Proofpoint-GUID: 140FHvDZ6kd3-ILb7yZ5_cpvjB6FQ4Dv X-Proofpoint-ORIG-GUID: 140FHvDZ6kd3-ILb7yZ5_cpvjB6FQ4Dv X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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 08/10/23 09:49, Kefeng Wang wrote: > > > On 2023/8/10 6:44, Mike Kravetz wrote: > > On 08/09/23 13:53, Mike Kravetz wrote: > > > On 08/09/23 20:37, Kefeng Wang wrote: > > > > > > > > > > Cc Mike to help us clarify the expected behavior of hugetlb. > > > > > > > > > > Hi Mike, what is the expected behavior, if a user tries to use move_pages() > > > > > to migrate a non head page of a hugetlb page? > > > > > > > > Could you give some advise, thanks > > > > > > > > > > Sorry, I was away for a while. > > > > > > It seems unfortunate that move_pages says the passed user addresses > > > should be aligned to page boundaries. However, IIUC this is not checked > > > or enforced. Otherwise, passing a hugetlb page should return the same > > > error. > > > > > > One thought would be that hugetlb mappings should behave the same > > > non-hugetlb mappings. If passed the address of a hugetlb tail page, align > > > the address to a hugetlb boundary and migrate the page. This changes the > > > existing behavior. However, it would be hard to imagine anyone depending > > > on this. > > > > > > After taking a closer look at the add_page_for_migration(), it seems to > > > just ignore passed tail pages and do nothing for such passed addresses. > > > Correct? Or, am I missing something? Perhaps that is behavior we want/ > > > need to preserve? > > > > My mistake, status -EACCES is returned when passing a tail page of a > > hugetlb page. > > > > As mentioned in previous mail, before e66f17ff7177 ("mm/hugetlb: take > page table lock in follow_huge_pmd()") in v4.0, follow_page() will > return NULL on tail page for Huagetlb page, so move_pages() will return > -ENOENT errno, but after that commit, -EACCES is returned. > > Meanwhile, the behavior of THP/HUGETLB is different, the whole THP will be > migrated on a tail page, but HUGETLB will return -EACCES(after v4.0) > or -ENOENT(before v4.0) on tail page. > > > Back to the question of 'What is the expected behavior if a tail page is > > passed?'. I do not think we have defined an expected behavior. If > > anything is 'expected' I would say it is -EACCES as returned today. > > > > My question is, > > Should we keep seem behavior between HUGETLB and THP, or only change the > errno from -EACCES to -ENOENT/-EBUSY. Just to be clear. When you say "keep seem behavior between HUGETLB and THP", are you saying that you would like hugetlb to perform migration of the entire hugetlb page if a tail page is passed? IMO, this would be ideal as it would mean that hugetlb and THP behave the same when passed the address of a tail page. The fewer places where hugetlb behavior diverges, the better. However, this does change behavior. As mentioned above, I have a hard time imagining someone depending on the behavior that passing the address of a hugetlb tail page returns error. But, this is almost impossible to predict. Thoughts from others? -- Mike Kravetz > > I would like to drop PageHead() check for Hugetlb to keep seem behavior, > which will keep seem error code if isolate fail or success on head/tail > page. > > Thanks.