From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B75003CFF65 for ; Fri, 24 Apr 2026 16:23:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777047817; cv=none; b=TAKX4Mpr0OQmSpATAIzseIGv8gxstCvkK63to6B6TD2Ca53C/V7jMYlqeGw60A4Cq0zfAq2o2zys/5wHUta3k+1nCKjguZwlssiB8JPpn3ZK7/0bru7sKqf4K+ziLT/kvzctUQGRidFRcAgTu1nft01FKwTa8qO5nKxxz1kvdnQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777047817; c=relaxed/simple; bh=XHsSKdWBfJ8xwH2NIQLRNdaVkmG3kAIguJv5IXWgybE=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=RECyYJgnndaP6ijfL/QOpdoCt5NMBkFejsW1lHhssqJ7Y+D5hFd2ZWbG6IGR9SZp6zkVIb9uY+vjgOI9QGVCWUX4+FtUSxWEuv0wUbTCvHXYJEZN7mgT6InRAAnQ7DoFerqYB0s1/fxAyQJmsjy911G7qtunLRq1GpbF0VRPigo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=IRwXu7Od; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="IRwXu7Od" Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF255C19425; Fri, 24 Apr 2026 16:23:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linux-foundation.org; s=korg; t=1777047817; bh=XHsSKdWBfJ8xwH2NIQLRNdaVkmG3kAIguJv5IXWgybE=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=IRwXu7OdxvrX2QIsdEBmnerp/FQxrMkuestO4WSRa4Ol4ytF6NdcGJwxtgk/s4qvq Tvron+PGjWCumBCJappijmqHHP6gQDpbrHChlmRlBjgdgoWvqZ/6gU2YdqlW4j+CjM T9RWxvaz3W6ibHB9jYQOXSags19Ho+fp2RAnGoEs= Date: Fri, 24 Apr 2026 09:23:36 -0700 From: Andrew Morton To: mpenttil@redhat.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, David Hildenbrand , Jason Gunthorpe , Leon Romanovsky , Alistair Popple , Balbir Singh , Zi Yan , Matthew Brost , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko Subject: Re: [PATCH v8 0/5] Migrate on fault for device pages Message-Id: <20260424092336.7f8f5b0c00f4b46f9e0879d9@linux-foundation.org> In-Reply-To: <20260414041226.1539439-1-mpenttil@redhat.com> References: <20260414041226.1539439-1-mpenttil@redhat.com> X-Mailer: Sylpheed 3.8.0beta1 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On Tue, 14 Apr 2026 07:12:21 +0300 mpenttil@redhat.com wrote: > From: Mika Penttil=E4 >=20 > Currently, the way device page faulting and migration works > is not optimal, if you want to do both fault handling and > migration at once. >=20 > Being able to migrate not present pages (or pages mapped with incorrect > permissions, eg. COW) to the GPU requires doing either of the > following sequences: >=20 > ... > Via which tree would it be best to upstream this? > include/linux/hmm.h | 19 +- > include/linux/migrate.h | 26 +- > lib/test_hmm.c | 101 ++- > lib/test_hmm_uapi.h | 19 +- > mm/Kconfig | 2 + > mm/hmm.c | 821 +++++++++++++++++++++++-- > mm/migrate_device.c | 589 +++--------------- > tools/testing/selftests/mm/hmm-tests.c | 54 ++ > 8 files changed, 1053 insertions(+), 578 deletions(-) Looks like mm.git. It might be more useful to add it to a DRM tree if there's ongoing development against this. But please no upstreaming without good review! Anyway, this is a bit dated and Sashiko AI review wasn't able to apply the patches. Nor was it able to apply v7 or v6. So please refresh, retest, resend?