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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4D5DC83038 for ; Wed, 2 Jul 2025 08:24:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5E1068E0005; Wed, 2 Jul 2025 04:24:15 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 591148E0001; Wed, 2 Jul 2025 04:24:15 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 432E68E0005; Wed, 2 Jul 2025 04:24:15 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 1C9628E0001 for ; Wed, 2 Jul 2025 04:24:15 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 78F131A075D for ; Wed, 2 Jul 2025 08:24:14 +0000 (UTC) X-FDA: 83618637228.18.52B00F1 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2060.outbound.protection.outlook.com [40.107.243.60]) by imf27.hostedemail.com (Postfix) with ESMTP id A011040006 for ; Wed, 2 Jul 2025 08:24:11 +0000 (UTC) Authentication-Results: imf27.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=iP+mXZKe; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf27.hostedemail.com: domain of Christian.Koenig@amd.com designates 40.107.243.60 as permitted sender) smtp.mailfrom=Christian.Koenig@amd.com ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1751444651; a=rsa-sha256; cv=pass; b=PdMBKbqgdkzKpOkJVhrSOBb+/gwfk4Sot19Sv3OzAaSvGj1dxJF/XsCLUb/NsqjmYJqsnC MlYacVFYNFVvohkTk+4YdlVq/toM7JdbsSZE7RPJbBsskoEQpC8Pv3AwPJ06GRXmFl3ECf VO7XhZJ1KD1smfQVwnUaWA+6OxAxE9w= ARC-Authentication-Results: i=2; imf27.hostedemail.com; dkim=pass header.d=amd.com header.s=selector1 header.b=iP+mXZKe; dmarc=pass (policy=quarantine) header.from=amd.com; arc=pass ("microsoft.com:s=arcselector10001:i=1"); spf=pass (imf27.hostedemail.com: domain of Christian.Koenig@amd.com designates 40.107.243.60 as permitted sender) smtp.mailfrom=Christian.Koenig@amd.com ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1751444651; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=ilh421kgNB/Y4uW126xcU37ahy7+i2VC/ZsMosWxPkw=; b=X4eDjBDDZtTr9Gk5TA9i1pC/JkN74l8PDobWGp7mQAmwP11rDe+1+UnIoiVThn+nfxqei0 +gDBOyUXd9QribLdb/6hqGoT+++SvHFeEZ41BPd7CIIudliwY4hPs6dE1ECGlOJE1RTit8 HnzUyFcBxPqoLrQ1O0DhC/xAnwi8w8M= ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=iB9+zoOqwNzP1gyomdbClPb7Nem3oCfGD02GbuTHsVnWvTCfvYmBVgx1zAISuyHMTczpd+TOAJ5bgT6EChxRj2XGikZpuoi95rpR6QazlQgLJdshTFcI0x57kXl4ftv6gmbXYAh5efXQymWJQsKnmBmtg/r+5ZpT+dePce7EI/FvVs+nXLm+z45wxSMZ+rUAuERRPnwsAwgtDUVeKcdfAXqmlfIyDq3Hpjk3O/2OlnZiPJiQ+sZlxteF+9Ee1kcIMxrWO1dmxsjJoL9CTUvAye2xuGGDlTkmTLlEGWvVxAYy5HsYg7BhfnXsmHtb4aTC4CJf5aIDe/6tWeUzLgcafQ== 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=ilh421kgNB/Y4uW126xcU37ahy7+i2VC/ZsMosWxPkw=; b=K8SaSRPfjQmlZIfSpMuxdJC/hddIBNDeAwIA4gEgD11ByGWwLgRA9VMoi4EYj8c/8IgBb6dt5mHOg0ZRL3wuszwlypZTMnDfS/kyD4fvEJeEFpzNvsEaTHMZztNiU3Fl8g3Y6aGxkKYYNiUryoo9lvNJQZp7AJpIyIA5UZPW7cH+rewUmuJhjE17vzvRNcEwspn7YirRE/mvnblIZHd5FIgQOydftOM2xLUsNsYOguiM8fy3LH2BU5MhE4CkNE/Cxi6LqAx6MzeCYJCiknDpeSbswDITfyw6iCqmPa3htq3W6i01QA30Wc1qCVZ+YHIiBsoQuj5mfasspOGR126NSw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none 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=ilh421kgNB/Y4uW126xcU37ahy7+i2VC/ZsMosWxPkw=; b=iP+mXZKejvYB737ZB8L4aaQji6Uh5M4/RI6X5Ixvx3dINdXWi079P7hNzilDa5VtRmha96AuuGWStbLYy61qc9PCRSEywIvCn3BzkPLEJU39kcJtodmpqgwt1zX68YSETLdHUW0eN0rwwAzRl1KrJJqjNMPvfdy9wUcb9xEptyQ= Received: from PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) by SA0PR12MB4479.namprd12.prod.outlook.com (2603:10b6:806:95::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8901.21; Wed, 2 Jul 2025 08:24:09 +0000 Received: from PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::46fb:96f2:7667:7ca5]) by PH7PR12MB5685.namprd12.prod.outlook.com ([fe80::46fb:96f2:7667:7ca5%5]) with mapi id 15.20.8901.018; Wed, 2 Jul 2025 08:24:09 +0000 Message-ID: Date: Wed, 2 Jul 2025 10:24:05 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 12/17] ttm: add objcg pointer to bo and tt To: David Airlie Cc: Dave Airlie , dri-devel@lists.freedesktop.org, linux-mm@kvack.org, Johannes Weiner , Dave Chinner , Kairui Song References: <20250630045005.1337339-1-airlied@gmail.com> <20250630045005.1337339-13-airlied@gmail.com> <20a90668-3ddf-4153-9953-a2df9179a1b1@amd.com> <26c79b1e-0f7f-4efa-9040-92df8c5bdf1f@amd.com> <54b2ee4a-0f2f-49a1-a680-8dc1193e2d30@amd.com> Content-Language: en-US From: =?UTF-8?Q?Christian_K=C3=B6nig?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: FR4P281CA0380.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:f7::8) To PH7PR12MB5685.namprd12.prod.outlook.com (2603:10b6:510:13c::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PH7PR12MB5685:EE_|SA0PR12MB4479:EE_ X-MS-Office365-Filtering-Correlation-Id: 4b51ff5c-d304-4f4a-2dac-08ddb941d115 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?T2tXY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09iakNTSDdFTElvUWFQSTdqVks4KzZSeUlMY3hu?= =?utf-8?B?MElVMjNMTS9MMWdRdmxJQzF0VmRWQi9CaUFMRFVJckxUMFlUQWxPbDkwU0hI?= =?utf-8?B?YjJ1VzBRdGtlT0ZrWUFxK0Ntc29Vd2crSXlHS1gzeDk0MmlRRk9XRC9jQnlq?= =?utf-8?Q?uCpq3QH7ljY=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PH7PR12MB5685.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(1800799024)(366016);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?QlBMdW9FaURFUWdUdkk4ckhraUQvbFhMWUZmbzArUHVQSDM2MlhzTE16Mjll?= =?utf-8?B?dGNLYkVmTmdrcWlrREVCdE9PNy9OS1c3L1RKOCtEeFZzdWFYcGdYRDAvRHZR?= =?utf-8?B?ZkhRR29XcFhJclBVTWkzZnlsaHR0enprYWQwb1JGc3RhaUhvREI2WVlVVmtx?= =?utf-8?B?Y0JLQWNLOFpaSGhhTHBrbXNJcG9FMFZpdlp3L3RKNmdTaGlqOWFDQm9QbUVr?= =?utf-8?B?Sm1HWDlucVN1OXJZRG15anRic0FXQS9SaW5udnE4NUEwOWVmY1o1b1dYbk9w?= =?utf-8?B?akNlakxGa210bHJuaFNrTm1HaW90TmhIQkF1TFVzYlp0RVNVb0FjQS94V0dB?= =?utf-8?B?bHFOQWpQY0RuWm14a3MzbmJRZ0ZKOTRtS1ZNbDJXSVd0dWZWVStGbWV2VzY1?= =?utf-8?B?dVVSN1pITzF2dXVWa0xFb21jMjNlRDBJdGNKTm9IdGZhNmJ4dG9Nb1dqRCtm?= =?utf-8?B?amUwc1BPME9XV2hPaERaVkFLY1ZkQUR4Tk1SUHF0UnRyaEV4bndLeUxHRjNV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0VTZzUC9FWWU2aVZG?= =?utf-8?B?M0lkTDFiQkZmbUxvQTRZcDdaK25mU0g5bTJSU0JnQ1dtcWhsSU1RNHFlY081?= =?utf-8?B?SFBoZXpGMFJnY2tLazQ3dFRnVkROMU5rSGdVQkdhbE9ORW1sd2FXZUhhV2F6?= =?utf-8?B?KzV0ejhvVGFLNko5Z2pVY2FJWVAwUWdtbk5nK1R0bHEvZFZNWXQvUUVWcWVy?= =?utf-8?B?NUxYOEFaR3k1NUY1Tk9qQXErZ2dPeWpONWRsQ0Z2eE5yOGsrblJCdlVVRWpU?= =?utf-8?B?alprd3p6U0ttUDZ2TUhJWUVkQU9ua0ppRUJJckZ6VFlzb1JqNytXK2tHZzhL?= =?utf-8?B?anBQeHdocUxpTzdINU53aFZ3MS9tajRhNUhFdWpBb3NFM2ZPVVJhZU1LS0Zw?= =?utf-8?B?bkkrRnlnRXhiQlBXLzkyVEV3NmRYQlg3WiswcGxUNUxsVEFmZ0dqd0hVUnor?= =?utf-8?B?T1l1M0ppN3lIeWF5OUFvOGZDM2N5TStDaVFpRTlLRmZIQ2h0MVdtUllKQWZX?= =?utf-8?B?T1FZdnFKekpDNVBPWGZIWndLWW9xQ0NERG52N0dGK3YrcktTYjE5MTlRLzhJ?= =?utf-8?B?OFNUNjd3Wm0xQXhYbEVRaEcxdnpSVXovU2lTZ1hreDZMTnRwWVMwMzcyQmVG?= =?utf-8?B?RWZtWHR6b3VpTk4xbzcvOEpWMThZZG55RUJ4Sjl3dTNPUFlOdzhHd3dsMTNU?= =?utf-8?Q?t7ZWskTUx96Z2hT+CS1fY96yZ?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b51ff5c-d304-4f4a-2dac-08ddb941d115 X-MS-Exchange-CrossTenant-AuthSource: PH7PR12MB5685.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Jul 2025 08:24:08.9896 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: q7rd+UPXEHVlYyhv7f04u7CAIYrBdKS73fq8u6XIcsY4pwQBsIvCfoHC4Fgwi9lZ X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA0PR12MB4479 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: A011040006 X-Stat-Signature: tiu5oxiseq17qdzp6kwi94n5j6w36wp5 X-HE-Tag: 1751444651-301944 X-HE-Meta: U2FsdGVkX1/8ynU7Z5UAdI2ygSKMqJlq3iSxBmkNzZPkqyuZpj71BO9xNTW0ohpp3MnGSZAfkhqDHouUS2ybHF90HGUI5pT765nGd4zgJSY2oD4kDNqEjREJqZf5F+VY+yvdJu4zU6OBkF2jSZsPhUnZRUviweEXDcpTSDcEPwhtvS6FB2pjVaK7HeHhG9jpyK/igvtHX6kKlb4zI919z+p7tKFvbnzBd0thpqezX//gaxacpGqOCjmD+EXNgR27ExX5xGYxlWQIBi8c/VYq/NSBf93M6UzygcV1f7TH4H6OS8O5CNhDX5Xw6rWHOSBuk2/Q3DwJXUdmXfZHUXgkV739hiTGdh5alvAT7b03ekMIC+OVvPpgaXIuwljxhNJNcs85vpYiZwch9QtheCE0/Cb0QJO3oz6DI7uLNmy0tBF4Zm8R2q67SvlGmhgzSe+kSRKtOyqibTA8LLn7/VMYL8Ga4BVPpz34Lp2A3p4HxYrXmWd4DzVOm+UNmKoQBQY+CW+vEkTOZ3rtUHqgf4aPHDIGmVYYgstgkJSBu0haNTk8sJqZrQVPrBqe50TsT0KeRXhj1JuUB4fjKClJ+siQ2g5bqXhpC3wSP3u0QA+uDX/nLlqQKK2juJpDHVxmVkyilEw16dOV0xGjWTvT8M7JKHfAQsTqyaIHKkVaQZTEsI3LquRv/Fzpekl73UbYlsuFa+K1JucroYWiHy4XszFG+cBS9YbYvnM4M5xsr5uwhWVvi8SzxJKPuGrCHh20RceMkxEIOuhIzW4pQBso9vfoB172pD4Gq/9+Ab3slSZEBsz48sIOUfOlI9btuH5h5IkIJL+kYwttgPXOxl1W+3nwuUbsNggmJzlzr3FWdJ0yJ85EjN4D3SsQQpG7Vm44z7yRbmmoH4TOF/fivW09tHMrGjXZUxmd6MvtAQG7UP5i/st2Gqqg6LptJcy2bbSJx4hNSBrH9+z/y/ahqgPNHfq rsGSzgC5 rZ565wCTXneyjuJV9YZI7adh+gdNekaoXvmR2BCgpQlVpClfGSMmIHYOf1avondtYcmiAVX/0xZj2V1bLnbobh09UW7nkXz2K7tEPimhYvbkrXPKuAFUVCpB4HBv1FCR4LM4ftq1O+GPVVL5ZmUp7oNoLli/Hu6MhHyVLU4RXqtIazPvjf+hSriscu09Q12ls2oySB8vDAhQLSMhbBX/wO+8sE3cRsGzovet500LaoE358C4qIPE3RVOcsemqOnYEUE/yoxfNSDodwXzO9vR26AuKu6OJI7L3Q8rkAhNQCoqUa7aWCX+UXT24Bjv37kRJRzN55aZtIksXODuDN0ocq/eReotIF7iWDNn1eJ9WUBZY+OqTjw/nHiAkCmCz6+IHJBEF1AnJdImjhmE/ASsrXcBHk9R2lp1W/dQsJuNB/0C5E/r5pjMjHfg7GnY/gDkkqm77ACbTrAXZ8vpnhSylTw+wtfYixV2pfVIX 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: List-Subscribe: List-Unsubscribe: On 02.07.25 09:57, David Airlie wrote: >>> >>> It makes it easier now, but when we have to solve swapping, step one >>> will be moving all this code around to what I have now, and starting >>> from there. >>> >>> This just raises the bar to solving the next problem. >>> >>> We need to find incremental approaches to getting all the pieces of >>> the puzzle solved, or else we will still be here in 10 years. >>> >>> The steps I've formulated (none of them are perfect, but they all seem >>> better than status quo) >>> >>> 1. add global counters for pages - now we can at least see things in >>> vmstat and per-node >>> 2. add numa to the pool lru - we can remove our own numa code and >>> align with core kernel - probably doesn't help anything >> >> So far no objections from my side to that. >> >>> 3. add memcg awareness to the pool and pool shrinker. >>> if you are on a APU with no swap configured - you have a lot better time. >>> if you are on a dGPU or APU with swap - you have a moderately >>> better time, but I can't see you having a worse time. >> >> Well that's what I'm strongly disagreeing on. >> >> Adding memcg to the pool has no value at all and complicates things massively when moving forward. >> >> What exactly should be the benefit of that? > > I'm already showing the benefit of the pool moving to memcg, we've > even talked about it multiple times on the list, it's not a OMG change > the world benefit, but it definitely provides better alignment between > the pool and memcg allocations. > > We expose userspace API to allocate write combined memory, we do this > for all currently supported CPU/GPUs. We might think in the future we > don't want to continue to do this, but we do it now. My Fedora 42 > desktop uses it, even if you say there is no need. > > If I allocate 100% of my memcg budget to WC memory, free it, then > allocate 100% of my budget to non-WC memory, we break container > containment as we can force other cgroups to run out of memory budget > and have to call the global shrinker. Yeah and that is perfectly intentional. > With this in place, the > container that allocates the WC memory also pays the price to switch > it back. Again this is just correctness, it's not going to fix any > major workloads, but I also don't think it should cause any > regressions, since it won't be worse than current worst case > expectation for most workloads. No, this is not correct behavior any more. Memory which is used by your cgroup is not used for allocations by another cgroup any more nor given back to the core memory managment for the page pool. E.g. one cgroup can't steal the memory from another cgroup any more. In other words that is reserving the memory for the cgroup and don't give it back to the global pool as soon as you free it. That would only be acceptable if we have per cgroup limit on the pool size which is *much* lower than the current global limit we have. Maybe we could register a memcg aware shrinker, but not make the LRU memcg aware or something like that. As far as I can see that would give us the benefit of both approaches, the only problem is that we would have to do per cgroup counter tracking on our own. That's why I asked if we could have TTM pool specific variables in the cgroup. Another alternative would be to change the LRU so that we track per memcg, but allow stealing of pages between cgroups. > I'm not just adding memcg awareness to the pool though, that is just > completeness, I'm adding memcg awareness to all GPU system memory > allocations, and making sure swapout works (which it does), swapin > probably needs more work. > > The future work is integerating ttm swap mechanisms with memcg to get it right. >>> >>> Accounting at the resource level makes stuff better, but I don't >>> believe after implementing it that it is consistent with solving the >>> overall problem. >> >> Exactly that's my point. See accounting is no problem at all, that can be done on any possible level. >> >> What is tricky is shrinking, e.g. either core MM or memcg asking to reduce the usage of memory and moving things into swap. >> >> And that can only be done either on the resource level or the tt object, but not the pool level. > > I understand we have to add more code to the tt level and that's fine, > I just don't see why you think starting at the bottom level is wrong? > it clearly has a use, and it's just cleaning up and preparing the > levels, so we can move up and solve the next problem. Because we don't have the necessary functionality to implement a memcg aware shrinker which moves BOs into swap there. >> The whole TTM pool is to aid a 28 year old HW design which has no practical relevance on modern systems and we should really not touch that in any way possible. > > Modern systems are still using it, I'm still seeing WC allocations, > they still seem to have some cost associated with them on x86-64, they > certainly aren't free. I don't care if they aren't practical, but if > they are a way to route around container containment, they need to be > fixed. Completely agree to that, but we can't regress anything existing while doing so. And I'm pretty sure that we do have use cases which rely on that behavior, so those use cases will regress. Christian. > > Dave. >