From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from CY7PR03CU001.outbound.protection.outlook.com (mail-westcentralusazon11010056.outbound.protection.outlook.com [40.93.198.56]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B86D440DFB7 for ; Wed, 22 Apr 2026 04:16:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.198.56 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776831385; cv=fail; b=dx7rVgM8sbtYbrcrtdSAeLRnhfHgq80M8vWy43+Jxgzdzvt+r/Gkz/Cl3UI0v+ltHAXf+P9ltyYzIYPS5tYYlQJVGq4q0gcsFikSr2pBDwXTgZYbGwf78298GKtI4DFLS5MtvC78P3Mp6iYENww3mHMvXEyazuIgQRDFd3gWA0k= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776831385; c=relaxed/simple; bh=/bJv9owfYcjm3mt1ECxPanSMKk20oIgZHr/kR840B8Q=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=cwQJ3AfpYqaqFdFFmCV+DSpcmLTPIC6HpFeYz4dcwoUC468tGmMt+7gjiSyl8lzeRrHvmsYBY0WmRHkfrFv8EZQQVwuIT4EEaK6QjXuW4WU+B0CqBX+iQWWwUmIT27eKoYTTbRxUY3JniasJP+IIc2bFeLiAb4d49qJlacKWmYk= ARC-Authentication-Results:i=2; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com; spf=fail smtp.mailfrom=amd.com; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b=1m7xd6+5; arc=fail smtp.client-ip=40.93.198.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amd.com Authentication-Results: smtp.subspace.kernel.org; spf=fail smtp.mailfrom=amd.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amd.com header.i=@amd.com header.b="1m7xd6+5" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=sLV73XDmLZntfC9teWKfEI+wl8WWwXTZpK8iPmjDqVs7sFDHA4qKwE47F43eeyy9ZQ+54WZwa2sl0fAzdhKOOyD1yZ0KfsYegvTfWPGUfjxaX60Osmjv/hEeCXaLRufGr3fZvihuRCPV7AOu7SHf2iwsqWm88VkjN6+avI9FjuT13zk0s/ShHjrkkLOpRvbcUdoNO6hbx2VifURztFldTDm5NYuICx3Re4xN5NpfNu7tdmPS3I7uy5UKo8m91EO0QGF3pY2zZ8CyT1X0bdGw7Zv+9YDLBO9m4iiXA3sU3m8to5ST6Kvc4drFnKD8Vz08x0TjRCtPDAOi9bocg1mlLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=llMyywFH5yFDBxwR1EoNL+lmV0vnAKlWBctyieKZ578=; b=j9yAs1I834wdt61rOLwJjgG3awPPIJuKim2a4WFvnfN/TbisXez+/xQcqpTnlXpKUPVWu3QyOjZ1Z+xU0cY8/YjxmIhrtKGP3vlkTJnKesMnULuB9SiRf2PszjJK2NriUwq2VbQdhw5laU0O71qgHYTcVpePFvFmvbxtDDRQ3yIuE+xzLiIp+ne20EFnOlNlU8sngVoBQ8InJmBjPn3oLQFbwFjUWCMFYF/WXXQN0lkUnTucOGU7rSGStWVfUX4m3a4LaQRKMU2mgkQPw9RX/qdIciCvTLZCRtc/hlmQIsWfXrKYQ1y6uhzIzg53Z4JTAeImCetSEnz0EWhWEX1osA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux.ibm.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=llMyywFH5yFDBxwR1EoNL+lmV0vnAKlWBctyieKZ578=; b=1m7xd6+5VIQEKIm0nnccIQt3h3hZDeXR+5/DsJOSLKhZMjvuNiV/vffEBC+FXnO2wLLGTwQZGjbMP3ByeyXOn39Zc+8pbH1IxnYKG7nm5RmcXOjhvAFFGmou+dvFyIg2PyfORjLVjNVnSNRW7N2bbHZbhoc6ko3bQ5N5HYcDYPw= Received: from SJ0PR03CA0099.namprd03.prod.outlook.com (2603:10b6:a03:333::14) by IA1PR12MB8312.namprd12.prod.outlook.com (2603:10b6:208:3fc::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.16; Wed, 22 Apr 2026 04:16:16 +0000 Received: from BY1PEPF0001AE16.namprd04.prod.outlook.com (2603:10b6:a03:333:cafe::97) by SJ0PR03CA0099.outlook.office365.com (2603:10b6:a03:333::14) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9791.48 via Frontend Transport; Wed, 22 Apr 2026 04:16:15 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 165.204.84.17) smtp.mailfrom=amd.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=amd.com; Received-SPF: Pass (protection.outlook.com: domain of amd.com designates 165.204.84.17 as permitted sender) receiver=protection.outlook.com; client-ip=165.204.84.17; helo=satlexmb07.amd.com; pr=C Received: from satlexmb07.amd.com (165.204.84.17) by BY1PEPF0001AE16.mail.protection.outlook.com (10.167.242.104) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.18 via Frontend Transport; Wed, 22 Apr 2026 04:16:15 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Tue, 21 Apr 2026 23:16:11 -0500 Received: from satlexmb07.amd.com (10.181.42.216) by satlexmb10.amd.com (10.181.42.219) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.17; Tue, 21 Apr 2026 23:16:11 -0500 Received: from [10.252.223.214] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.17 via Frontend Transport; Tue, 21 Apr 2026 23:16:04 -0500 Message-ID: <30f47bd5-68a2-4be5-a4be-d4b8801de810@amd.com> Date: Wed, 22 Apr 2026 09:45:59 +0530 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [RFC PATCH v6 2/5] mm: migrate: Add migrate_misplaced_folios_batch() To: Donet Tom , Gregory Price CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20260323095104.238982-1-bharata@amd.com> <20260323095104.238982-3-bharata@amd.com> <24cd6a95-1304-4732-9273-43c73ea858b2@linux.ibm.com> <45b93560-acdb-4552-bac5-bd085d778085@linux.ibm.com> Content-Language: en-US From: Bharata B Rao In-Reply-To: <45b93560-acdb-4552-bac5-bd085d778085@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: BY1PEPF0001AE16:EE_|IA1PR12MB8312:EE_ X-MS-Office365-Filtering-Correlation-Id: f0358eaf-db13-431a-12a4-08dea025e591 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|36860700016|376014|7416014|1800799024|22082099003|56012099003|18002099003; X-Microsoft-Antispam-Message-Info: AMX4mW4EVIzzM1p+UHV87uHYwY9iFVGfOC3+DHLT36qjdHEE7THTlAu2s9z4pZasceBmgO7G1tI+Mn9TcuXItPS4SC3Ka4pLm+VTj1sEb8ICeUWUBGEDoHValdx3atCsEomaV5JcqoNuYbU42M3e57S7FWqtWIIRcT6HM3DER+Bi4O0a+4hg9UhQq+/lmRSNBfemCiVONGOJoYw2Uu7ztxkFvlZ8B+HmKQ7uRJKCxSzphikqur4rBVCIs0to74vpNMNTKKT01oL9Dx8RKwsZnFA1M7WLFA032gVRf2RnpS85u2OYLbmRaBGw3u1CSmXCRIomYs+fAdloj6vBYJlPqZ5vbgVCAe6NfJpP7M+EMHiw1sHiFKzm29Mu3oPYeqbJV+q27fMAn1nG0hb8O4B8IVlxXdUExtC1WJwt45VVhyyyac7H93aTa2F9DHQSBFvJMQFRpNonPzPE4Yfbo382lVdHFCTZ/IgPFz9cSXW5RMtG6ZIrTzeLtKWsXnbNsTgWICITUCeoUBql7is87XJE4HUikauXKkQNEiLhpl02iTri0/gts52Ts+dKPQQYrAcD4FIw7XwjJJ5U12wrxcNeLYK64vBRu+yIDBNdf9ft4HBNp5gVT5GfibZ+ZA6IT8WCBBWrbhAF/tTgl/fOTOIocp9BN4yu5l6ibO6txz1LWch0l+9jTFaepARK9Ec8VWH8i5Ee4ZRfg7cairfJXRGe2xqqgDOPmOEXawtIF0q8+2ThjCSzeRLV6ILEV1qRcT7z62S7wT5zm/kMtys60qaWFw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb07.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(36860700016)(376014)(7416014)(1800799024)(22082099003)(56012099003)(18002099003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: aCKiY7inbJKtki2ssMMOFZukvQ5K5VOptDDwwwrKiN8ArGqn4cnCP6AoOjdTc8HRKDM3cBJd+DVlR3S4K6PyLJYwN+IMMtg4lhYYDzxhi6XmYgZGkSXssU851M7WsoMAvJjuWtNPzDvEG7iNyP4dFu6LuU+mcf14ac1X+uW43ep6KPWkjv5yJB9L6dcV0iPYniPmHpAzgSwNNGTFLmqnYNvmRJSZZam1tyu2KNAQoNEcBQfHcyByVzVcjexr8OADaAq9mkamqf9JS1RKWt79OJwMDEHoQq/g5xIgkJK5ulW6kPMQSb+yykipf+nvBdW5cCmqX7D3TinQK8gNeRRYdd2Pm6QNn4BJaAqB0eJXe2ksREboHgMbIv20apre+liI6KCnG2XkyeK61sT0mGLqwUirv5NgjligUI4SPfHhDyOu0oZa8hJJ3y5UERhPiizp X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Apr 2026 04:16:15.8120 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f0358eaf-db13-431a-12a4-08dea025e591 X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=3dd8961f-e488-4e60-8e11-a82d994e183d;Ip=[165.204.84.17];Helo=[satlexmb07.amd.com] X-MS-Exchange-CrossTenant-AuthSource: BY1PEPF0001AE16.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8312 On 22-Apr-26 9:34 AM, Donet Tom wrote: > Hi Gregory > > On 4/22/26 9:07 AM, Gregory Price wrote: >> On Wed, Apr 22, 2026 at 08:56:59AM +0530, Bharata B Rao wrote: >>> On 21-Apr-26 9:35 PM, Gregory Price wrote: >>>> On Tue, Apr 21, 2026 at 08:55:02PM +0530, Donet Tom wrote: >>>>>> +/** >>>>>> + * migrate_misplaced_folios_batch() - Batch variant of >>>>>> migrate_misplaced_folio >>>>>> + * Attempts to migrate a folio list to the specified destination. >>>>>> + * @folio_list: Isolated list of folios to be batch-migrated. >>>>>> + * @node: The NUMA node ID to where the folios should be migrated. >>>>>> + * >>>>>> + * Caller is expected to have isolated the folios by calling >>>>>> + * migrate_misplaced_folio_prepare(), which will result in an >>>>>> + * elevated reference count on the folio. All the isolated folios >>>>>> + * in the list must belong to the same memcg so that NUMA_PAGE_MIGRATE >>>>>> + * stat can be attributed correctly to the memcg. >>> ^ This is the expectation from the caller. pghot caller ensures this. >>> I could add a debug check in this routine to verify if that is indeed so. >>> >> Wondering if the interface name should somehow reflect this as well, to >> make it a bit clearer. > > I agree—this would make the interface clearer. Sure, will change. Regards, Bharata.