From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from SN4PR0501CU005.outbound.protection.outlook.com (mail-southcentralusazon11011043.outbound.protection.outlook.com [40.93.194.43]) (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 EC49340EBB2 for ; Wed, 29 Jul 2026 09:35:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.93.194.43 ARC-Seal:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785317734; cv=fail; b=JoJgi1lm8OCdnIWRmT/n6wyiNycc3/2eE+jpDJ+Fi9yjmgjDvGi/JAP94ycEamWb3Ds/g9r9FqIekU1/3KBTwoVI9XtS6GwocgOlWa+J0X3h6Nno8jQaKd04sAOHu2g9nua2UCKpkSLvvlVhqY7wKRZ5poimD8gNVu/byTGS/AI= ARC-Message-Signature:i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785317734; c=relaxed/simple; bh=IqZvdsGriH2IcLTth7FvSmmswYJvF05JXGP+RKm8z9I=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=JcMjGcAXHzqc3yUYxbU2U3Qx/ARMDGlcNiCwDZyPQHh17p4ca4MxOoO1GR3A2MPHc/uDceFICannfQByh0QCW+gM5frwONmyxWmFr5pCD7u2SL134dRAa4Amx6F1aqE1dbbS7uFXPfu8Tzqupn7deuKlAcd2qmSZj8nEaYyg6fI= 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=kJsGcWVF; arc=fail smtp.client-ip=40.93.194.43 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="kJsGcWVF" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=cYMFGu0HeQh57romixaCE48Pg6GRkp1dx9E8EK/Ews4dlpVZCXjT9N7yqch5Zt9M47OJG5VfS8jLVms32WkntCzHz/dk6mD7meBA2R96Ic/Fm0qkejPCY5b0Tj1P2DZ5izJn8y8TNin82FFIhsvDPBJmH1YqdSIBwYJsRC/FMkCe/QG3owHY2Mvxz1xryv6jRUJuRxD36xJCkhnhqeI48MLXWmxa1zOVkAUh0Ht0Yp+smqgFLP7cCchcmsXzlYf7va5P5g2JNxUd269lNL8WT2spuP+2UUX4EHXsrqk0QtDRuxoPAU3IMxgSASADIPEdc0V6ALz3aU1Ls1NPA1vGxw== 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=v4hIC9IWLW5CHJdGBGbEJtpFSgG3nJwhpKMWtGiUDUQ=; b=hYmFGVrdlHDwkjDlYmdSPVzPAT4V7VVYr5s6XG1I0l/io9kIGWrg3UVJUgMscw91igVOCydg/7vcXQZwlEuqmuB0/EsD4gUZNqQ8dE2OBB4F5KCjd0Ed1UpoXivgCleoIfrDiGzMKc7Y46TehYaS19ROawndg3rwYdF3j7V91qT24ZWtTNTXNg15xpNfKmP5HI7hgpVM6QxBXjUK/uEMMJ6lIJcXNu6B52wsqr6W2KPZWmu4v6OrGYrS+k7rLoLDpJ/Yx93OFzt1BoaB3SSl767y8/CbZ/Cf3kQCBa21Dx/kMDy9mSSnK1Llm4RtWJB5u5Nc2ZcQepEGHlQAcmcXTA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=linux-foundation.org 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=v4hIC9IWLW5CHJdGBGbEJtpFSgG3nJwhpKMWtGiUDUQ=; b=kJsGcWVFtGJE8l92V74vDDFEyjg60ectQBEmGdZcb8UFQLFOM7CvKK+oYO6TzU8eTRSkpbYa294f/wMN4KOcupnTQFRSFY9fYbCAblEmTb65dM1vDG9Oj1UgRhzH6An+76if+12GvlNsCbbpCOVfpbav6SqVeDIyozWe2VZOk5Q= Received: from CH5P220CA0022.NAMP220.PROD.OUTLOOK.COM (2603:10b6:610:1ef::28) by CH3PR12MB9079.namprd12.prod.outlook.com (2603:10b6:610:1a1::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.12; Wed, 29 Jul 2026 09:35:25 +0000 Received: from DS3PEPF0000C381.namprd04.prod.outlook.com (2603:10b6:610:1ef:cafe::84) by CH5P220CA0022.outlook.office365.com (2603:10b6:610:1ef::28) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.21.270.13 via Frontend Transport; Wed, 29 Jul 2026 09:35:25 +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=satlexmb08.amd.com; pr=C Received: from satlexmb08.amd.com (165.204.84.17) by DS3PEPF0000C381.mail.protection.outlook.com (10.167.23.11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.21.270.5 via Frontend Transport; Wed, 29 Jul 2026 09:35:25 +0000 Received: from satlexmb10.amd.com (10.181.42.219) by satlexmb08.amd.com (10.181.42.217) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.41; Wed, 29 Jul 2026 04:35:19 -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.41; Wed, 29 Jul 2026 04:35:19 -0500 Received: from [172.31.176.217] (10.180.168.240) by satlexmb07.amd.com (10.181.42.216) with Microsoft SMTP Server id 15.2.2562.41 via Frontend Transport; Wed, 29 Jul 2026 04:35:11 -0500 Message-ID: <125de6c4-2fc7-4202-9199-347effe63112@amd.com> Date: Wed, 29 Jul 2026 15:05:10 +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: [PATCH v8 0/8] mm: Hot page tracking and promotion infrastructure To: Andrew Morton CC: , , , , , , , , , , , , , , , , , , , , , , , , , , , , References: <20260728054356.291998-1-bharata@amd.com> <20260728111401.b6d674baf8e56a27c55e0c52@linux-foundation.org> Content-Language: en-US From: Bharata B Rao In-Reply-To: <20260728111401.b6d674baf8e56a27c55e0c52@linux-foundation.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS3PEPF0000C381:EE_|CH3PR12MB9079:EE_ X-MS-Office365-Filtering-Correlation-Id: ec4697c9-3f82-4af8-d880-08deed54b813 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|82310400026|7416014|376014|23010399003|36860700016|1800799024|56012099006|11063799006|10067099003|4143699003|22082099003|18002099003|13003099007; X-Microsoft-Antispam-Message-Info: Sn4OAM1azgZWCOdsVrT2VmrL26rimCAx2EckBQUN0102aToyGrnJibeF8425ERRCyWgjg6J4Dvib9Dd544m7tWDCembTIqBlnLc9epJNVk/KO7Kszj6kybjsOzIh95KQSi49v+cw78jm6Xfit4wtaX2XXaUVBC/6G5eisuqCA/vVLFGrbVuQVN/R/+B7ptcDgLrlUMFgJ5HT8kyOlWT9A3rhM23bpRYfMKUj1ei8FuNFJkKBbl+iEmdZlEFV+Cq1WUALFzEZc+IfNIijO/I635RCGXBSuyn1tLr767tKEtGUMniwGaG9xiMQRyFJopyrhT6bLx9T1rcESStZNdSMMnA/EwF9wlSD75dCu/bnsWICOUTJ/5Qq5gfplpKIDVozT2jtb20SGiKkEl+87SgKgj3Z1W2X99hwMnL0qBm9fE0/0ofuu/v+48XZO/u0PcoQ5kejd4Boh+G0H46qdSHywU5jCdw+o5rbv47LwQBH9D3k/1nEgPuBZ7ki+dVXVIXlO7NGJVrUYLbxY49wyBnVYPwtCvzL9EhVtQ/fmK1iBtsawWbkltbrMlezbpe4zlc3V3IuwiZfZjhtGtMFqb5BkUaxqpcA3UmmcclKh1ssX/n27nAefrZd03OgjvFg+nhcV74Bd45QQazMR9+4GZg6rw== X-Forefront-Antispam-Report: CIP:165.204.84.17;CTRY:US;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:satlexmb08.amd.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230040)(82310400026)(7416014)(376014)(23010399003)(36860700016)(1800799024)(56012099006)(11063799006)(10067099003)(4143699003)(22082099003)(18002099003)(13003099007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: eL5xLFoXvyyS0QC88q7tIfPxSjysyFPj0EpFGVlnz8HaOnVuulWtL4WLxd4Kc6rpu3nhdAabxckfs0pbCDdOtHr28+LexnIIuoqo49djVBISEH5Qb9DkWGHDU8NL24hAx87gMkXuTG1BVj0SUId31BX+XqWmIMKBXXsOzD01KimaUbZnaoRLib+jwBaU9OfN1B3ZYxqX6XdlMNkTtkMm2ICo/KeJH75aMCoPwvYOaqkgroi7J1zQjHn+vRqODoULIT1d/id2iZdHbsl9xZKFOug/wAi8AtK0QflK5JZnURrP6JamoWYFiiz9gNRgT4BRchBsiKnDIqshoNRNxbirZc2eNAizGNgz2K5YDeW7F80xXB+Q9UJKlm5GtaxOKvua1vTA4arKcMJHutHaA1Xr7hAzwggUpLbtBe6/J2ICv+VVYw2UpBzmwBsy9P8aUnvo X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jul 2026 09:35:25.3747 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ec4697c9-3f82-4af8-d880-08deed54b813 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=[satlexmb08.amd.com] X-MS-Exchange-CrossTenant-AuthSource: DS3PEPF0000C381.namprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH3PR12MB9079 On 28-Jul-26 11:44 PM, Andrew Morton wrote: > On Tue, 28 Jul 2026 11:13:48 +0530 Bharata B Rao wrote: > >> This patchset introduces pghot, a subsystem for hot page tracking and >> promotion. > > Can DAMON be used to do this sort of thing adequately? That really depends on the goal I believe, let me expand... DAMON can indeed migrate hot pages today via DAMOS_MIGRATE_HOT, and IIUC it can even do promotion and demotion together that auto-tunes to a target node utilization. So for someone who wants to write a per-workload, per-process tiering policy from user space, DAMON is a good fit and I don't think pghot competes with it there. But the intent behind pghot isn't really to be another migration policy. It is to build a common in-kernel infrastructure that can act as a single promotion subsystem, fed by multiple sources, with the promotion engine and its heuristics (rate limiting, dynamic threshold) living in one place rather than in the scheduler. Hint faults are just the first source. The IBS Memory Profiler, which gives access information directly from the hardware, is the other one. CXL HMU can be another potential source. Hence the design centers on an exact, per-PFN record that any of these sources can update, rather than on sampling. The per-page, source-driven model is where the two differ the most. DAMON estimates hotness by sampling one page per region per interval, which is low overhead and self-contained, but it may miss a hot page inside a region. pghot records every reported access at PFN granularity, so it does not miss, but in turn it relies on a source to report the access. The other practical difference is that pghot works with no user-space agent at all. With numa_balancing=2 the promotion just happens, and in fact pghot takes over the mode-2 promotion path that currently sits in the scheduler. DAMON, outside of its built-in modules, expects a controller in user space to drive it, IIUC. So I would see DAMON and pghot as complementary rather than one replacing the other. In fact DAMON could well become one of the sources feeding pghot, and conversely pghot's batched, rate-limited engine could serve as a migration backend. > > Thanks, I'll await review input on this. > > AI review had much to say: > https://sashiko.dev/#/patchset/20260728054356.291998-1-bharata@amd.com Thanks, will address those comments. Regards, Bharata.