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]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D790ACDE007 for ; Thu, 25 Jun 2026 11:54:39 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BFD3C6B00C9; Thu, 25 Jun 2026 07:54:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id BD51D6B0128; Thu, 25 Jun 2026 07:54:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id AECA76B012A; Thu, 25 Jun 2026 07:54:33 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 8993A6B00C9 for ; Thu, 25 Jun 2026 07:54:33 -0400 (EDT) Received: from smtpin23.hostedemail.com (lb01a-stub [10.200.18.249]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0839DA05FE for ; Thu, 25 Jun 2026 11:54:33 +0000 (UTC) X-FDA: 84918277626.23.F27B14F Received: from sea.source.kernel.org (sea.source.kernel.org [172.234.252.31]) by imf20.hostedemail.com (Postfix) with ESMTP id 645251C000D for ; Thu, 25 Jun 2026 11:54:31 +0000 (UTC) Authentication-Results: imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=beu4O6BZ; spf=pass (imf20.hostedemail.com: domain of ljs@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=ljs@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org ARC-Seal: i=1; a=rsa-sha256; d=hostedemail.com; s=arc-20220608; cv=none; t=1782388471; b=Xg/5XUN2LnICXTNAXgm2rPKcO1lbzyBaTGGrVHVmNQMKziOJ3EjpVpNVTx2ea3g4UWtmMX 5brZg/XFjvuopcfNCwDGy35k5vf3+0G2pN+witVN9tVDLMxsRPKJ9GpwZE0fMddlgzi+MB YDmfxKh27nfmGiF+BxCYO7G6YA3Fyeg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1782388471; 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: in-reply-to:in-reply-to:references:references:dkim-signature; bh=/GXFi/MVRAwUZHw1Zk5DPCqLioIWwoiNAiqmK1nO1Ew=; b=CZ+c+EHuKcg+sBOF9H/3SQhsz9JebK0sH/fY87u19s+cbrkV9hM+clwqmwge7fU3aY6q6C e40Z19TFwKv6/hlIFTumJmHQ1ejSeqp0zCpEBoswWIy11ZnXLnJbT1dH4TUvP9nk3cBO+S Srr5TE2186ihtkNvwXOErrbVkdVFCYc= ARC-Authentication-Results: i=1; imf20.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20260515 header.b=beu4O6BZ; spf=pass (imf20.hostedemail.com: domain of ljs@kernel.org designates 172.234.252.31 as permitted sender) smtp.mailfrom=ljs@kernel.org; dmarc=pass (policy=quarantine) header.from=kernel.org Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id 96DF040B7B; Thu, 25 Jun 2026 11:54:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 264EE1F000E9; Thu, 25 Jun 2026 11:54:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1782388470; bh=/GXFi/MVRAwUZHw1Zk5DPCqLioIWwoiNAiqmK1nO1Ew=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=beu4O6BZP1eXIi45Dd5+lSUZZefTpFb3TjvzlFxLH0t/BOcXi8L6Dale141fqCl6Z /Xte0MUmMr3yT9Pcbt1Lg8nplPdvKdmOnIVohDbRXzgub0s/+nTkR/vXxf57AZz0CF SBFlmlwifSmHo/3s7jGSTq143SfCAFMwOl8TxWJ61LJRBo6NS6O+GjGXDZFEdykJda ZAhI6fYFT/UqiaP96opC92vgpKZ/jIEtfoHBzsGwNgcrPxbp9F0u58F4tUoecbcYza skRccOgyZHJp/MMsUbljWviO84DFhaq696UGJc6N0ZebJUxf28JNGPE6nucgOmoHxO kXQfySON4fttw== Date: Thu, 25 Jun 2026 12:54:20 +0100 From: Lorenzo Stoakes To: "David Hildenbrand (Arm)" Cc: Yitao Jiang , Alex Deucher , Christian =?utf-8?B?S8O2bmln?= , David Airlie , Simona Vetter , Felix Kuehling , Andrew Morton , Zi Yan , Baolin Wang , "Liam R . Howlett" , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Jann Horn , amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH 0/3] mm/mmu_notifier, drm/amdgpu: block THP for GPU user mappings Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspam-User: X-Stat-Signature: y3zrqnfhcsw1fxb7pxmeuf1bjc68z5ge X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 645251C000D X-HE-Tag: 1782388471-260293 X-HE-Meta: U2FsdGVkX1/69e4thw/3jTFfFtOKC0A8aF7T/FqYSZg0EdydUGhrV3NEI1PHuYcKJSRIl6kO1B2TQgqP9ihfoilXPLlvfjg/7/PDqgJtxKrM0gYnjhDIWuDK6DLq1OQQkscRRWNcecltAlf0cI9jIJuXventAQz5ifwGFDvvC8k65Ta/GGtQ4Ia/Quduuk/blOq5/3etmkOaA6hVLQqiM5gilbK/MJ117R53YHvDozqVwuBiCH/8aY+Cafu+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ner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: NAK to this or any version of this. This series is insane and the idea is insane. On Thu, Jun 25, 2026 at 01:47:25PM +0200, David Hildenbrand (Arm) wrote: > On 6/25/26 12:59, Yitao Jiang wrote: > > Hi, > > > > This series fixes a THP policy problem I found while debugging > > frequent ROCm GPU failures on an AMD Radeon 780M system during ML > > training. > > > > Some AMDGPU/KFD user mappings are registered through interval > > notifiers and cannot safely tolerate the backing VMA changing from base > > pages to a transparent huge page after registration. Userspace can > > still apply MADV_HUGEPAGE or MADV_COLLAPSE, and khugepaged can also > > collapse the range, after the GPU mapping has been registered. > > Huh, why? As a memory notifier user, you must be prepared from memory to get > unmapped+remapped at random points in time. > > What is the precise problem here? How are you handling THPs at registration time? > > Letting arbitrary drivers make THP policies sounds like the very wrong approach. We absolutely will not _ever_ allow drivers to do this while I still breath :) > > -- > Cheers, > > David Thanks, Lorenzo