From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F285606A31C for ; Fri, 13 Nov 2026 09:12:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=Bbcq+flr Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDC2111234A; Fri, 13 Nov 2026 09:12:15 +0000 (UTC) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3AC7110E79E for ; Fri, 13 Nov 2026 09:12:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1794561123; h=from:from: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; bh=l9qjP3EolVZNhFJ6yU6oKwddBCb6NF0vJywntTMZ9kE=; b=Bbcq+flrN8v/wCVVGVAvLeQHYqeHKGAKvnYn2qguXzBp3Y11tHYrehbqA7hrqEWLYmYbrs Apvgyz+aHNgkFzXQSGg1f8nGbrsPSFLeLE/5lUlURaaFZ4825exN9Zg83Fic8FRjtdHuoo 0PepzX+FKVqKyn7WLblblOXgl6J96iQ= Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-685-0GhVeWlIM8qxx3D82jhtzA-1; Fri, 13 Nov 2026 04:12:01 -0500 X-MC-Unique: 0GhVeWlIM8qxx3D82jhtzA-1 X-Mimecast-MFC-AGG-ID: 0GhVeWlIM8qxx3D82jhtzA_1794561120 Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-3acd4b46482so4276361fa.2 for ; Fri, 13 Nov 2026 01:12:01 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1794561120; x=1795165920; h=content-transfer-encoding:content-type:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=l9qjP3EolVZNhFJ6yU6oKwddBCb6NF0vJywntTMZ9kE=; b=ZoRHDjfGvBQlFnBJ3N8MzJSOsQ1pEYJf6hjTMIhJz8g5lrAcYKH7eYxfe6fs9lZ4GJ keqoHTthea/zxWoHcMyljUspLrfQsdnmZ6Es2pK9Fq2agpwBncLR3kq2g0Bu+oEF9eer PZrn1PfNYZW6Oy7sfK0llD6vcwwNZGmc2vBciQ1dpmn5YkKX87fJFf7iEIvuPv33lfj8 8wR0pRGTUn4+6VhCvSL4iI55w2iyCpgJxQ4R+3ird6E7bxYqe9+kdOToxhfD9CjvZHYP w1o/1KpWwNHqcMbfsltCLupAwAGGiefw+gUBttfrHgnNLZKvAJ68jw4sBmGNVy+XrPfN 0Qiw== X-Forwarded-Encrypted: i=1; AL+hErGduBgFmCPh8/rjACRrVjRpZ3NO1Raw3XAFJvbaqBEYcCMcV8tRHa7iTIzGRFIGzVsMLwENxJpt8Q==@lists.freedesktop.org X-Gm-Message-State: APuU4Z+V9qFo/Vcc9qeGIjpwW0Wv6TQQy3Ve8XVT0V/LF79cCbcYbY5R PaC/QZppmtcmAO1oUI0f6jvh9vMGETpXnD/AFNuDk+8drJIlP/Bwoe2j69L1gqFoSRiSbSP7A51 pBbZpWpwmP4RN9Ng3KpntkAtQtQ8ny3x0bcq/ANAFx3h4ZyCoHuEVd5+D1Pf2a3l43pk= X-Gm-Gg: AYBFou3vRT1iwvRD2shxfdTQBBhE7HLNzxRXywfSLaTjPMWNdYLWh9AoXXkPyIrTlUI C31UBYu9kVdqizfg1MyCq4NUms/EtPq8KEz/9q6z9sTl684FhxlzyhUqzK05bQpyaSezuLjPtIT Qvuyvd1DV20C9jpdg8yRHME22n72cMtBprj9NjwnpFJq4RiFbqJwayrFmKr/xs5xb7xlccw2h2v rKTcn0wCAPr4S1G8L44tZjQkIN3vkmUORSyhhchWKoD1tPrRvKD4hCEMl+y/cDIR/FypBK8QxCw 8FMQl9ZjGMNiVfct+Ls6Hu0RAltplyCrImLxLLnjU5mJ349/yXYlDH/tl1GndgGmyjGkgYCsYc8 QQpC3sZxi0enlDcgBHexWMNbNh/x8tLA/+jX2HpBDc27vDUoU0GYyaBIF9g9zXIbJDZ+HL2OxWH 2dcqs+ X-Received: by 2002:a05:651c:a347:b0:3ad:f8cc:390 with SMTP id 38308e7fff4ca-3ae2b4bc3f1mr7065961fa.11.1794561120257; Fri, 13 Nov 2026 01:12:00 -0800 (PST) X-Received: by 2002:a05:651c:a347:b0:3ad:f8cc:390 with SMTP id 38308e7fff4ca-3ae2b4bc3f1mr7065831fa.11.1794561119826; Fri, 13 Nov 2026 01:11:59 -0800 (PST) Received: from [192.168.1.86] (89-27-86-246.bb.dnainternet.fi. [89.27.86.246]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-3ae2b76a91fsm6490801fa.8.2026.11.13.01.11.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 13 Nov 2026 01:11:58 -0800 (PST) Message-ID: <2ad4f730-0656-4b2e-8cbb-4aaae44de1cd@redhat.com> Date: Fri, 13 Nov 2026 11:11:57 +0200 X-Archived-By: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v17 00/12] migrate on fault for device pages To: Andrew Morton Cc: Jason Gunthorpe , Alexandru Elisei , linux-mm@kvack.org, dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-kernel@vger.kernel.org, David Hildenbrand , Leon Romanovsky , Alistair Popple , Balbir Singh , Zi Yan , Matthew Brost , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Lyude Paul , Danilo Krummrich References: <20261103061629.972669-1-mpenttil@redhat.com> <79f33ab0-2e43-4efb-94d0-addaf40745ec@redhat.com> <20261112164752.GA3692174@nvidia.com> <20261112162738.d689b46268e077ac06f41d91@linux-foundation.org> From: =?UTF-8?Q?Mika_Penttil=C3=A4?= In-Reply-To: <20261112162738.d689b46268e077ac06f41d91@linux-foundation.org> X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hCAok99GhSqAOzU5B15xDONWzj55WbUzSe2NRAJQXwo_1794561120 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: intel-xe@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel Xe graphics driver List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Intel-xe" X-Spam-Status: No, score=-12.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 On 11/13/26 02:27, Andrew Morton wrote: > On Thu, 12 Nov 2026 19:01:58 +0200 Mika Penttilä wrote: > >> On 11/12/26 18:47, Jason Gunthorpe wrote: >>> On Thu, Nov 12, 2026 at 04:24:05PM +0000, Alexandru Elisei wrote: >>>> Hi Mika, >>>> >>>> On Thu, Nov 12, 2026 at 04:00:09PM +0200, Mika Penttilä wrote: >>>>> Hi Alexandru! >>>>> >>>>> On 11/12/26 13:56, Alexandru Elisei wrote: >>>>>> Hi Mika, >>>>>> >>>>>> I want to help getting this series merged, and I've been familiarizing myself >>>>>> with hmm and device migration, please bare with me if the questions I'm asking >>>>>> are obvious or downright silly. >>>>> Thanks for the interest and willing to help! I am preparing a v18 of the >>>>> series and plan to post it early next week. >>>> The series is big, and as far as I can tell the MM people are hard at work >>>> reviewing bug fixes. It might be better to wait a while, to give people a >>>> chance to have a look? I know that if I see a series being reposted often, >>>> I am less inclined to review the patches since probably a new iteration >>>> will be posted soon. But I can only speak for myself, you know best. >>> It is at v17 and it is still getting high severity sashiko errors >> v14 was first that sashiko managed to review. There was a regression in >> last posting, but also false potsitives, and sashiko reports same issue >> then 3-4 times, so the reality is not that bad.  > Pining for the days when all we had to deal with was checkpatch. Yeah.. running sashiko locally now. Interesting enough, refactoring the series (end result being the same) made most of the "high errors" disappear. > Mika, afaict the entire patchset is a performance optimization, yet you > say "I don't have a benchmark showing a gain". No not a performance optimization as is, in the latest cover I explain it: "The main goal of this patchset is to provide a new feature, migrate efficiently on fault, and not directly improve performance of current migrate_vma_setup() (which is now routed thru hmm_range_fault()) callers." The "efficiently" is wrong word, I should say "in one walk".  In the beginning of the cover, I explain the benefits of having one walk. Also, I think it is sensible to have one implementation for it in HMM, instead of each driver trying to do something similar. We don't currently have in kernel the capability to do migrate on fault in one walk, so I can't show a performance gain with a simple apples to apples test. Also : "the selftests show that there is at least no regression for current migrate_vma_setup() callers." So the test is to show there is no regression still for current callers (X86-64), not to show if there would be gains. > > Recipients look at patchsets wondering "why should I spend time on > this", especially in these times. It's best to answer this question > right there in the first sentence of the [0/N]. That means numbers, > and the better they are, the more attention the patchset will get. > >> Documentation/mm/hmm.rst | 45 + >> drivers/gpu/drm/nouveau/nouveau_dmem.c | 402 ++++++++- >> drivers/gpu/drm/nouveau/nouveau_dmem.h | 12 + >> drivers/gpu/drm/nouveau/nouveau_svm.c | 155 ++-- >> drivers/gpu/drm/nouveau/nouveau_svm.h | 5 + >> include/linux/hmm.h | 51 +- >> include/linux/migrate.h | 59 +- >> lib/test_hmm.c | 174 +++- >> lib/test_hmm_uapi.h | 21 +- >> mm/Kconfig | 1 + >> mm/hmm.c | 1075 ++++++++++++++++++++++-- >> mm/migrate_device.c | 618 +++----------- >> tools/testing/selftests/mm/hmm-tests.c | 56 ++ >> 13 files changed, 1984 insertions(+), 690 deletions(-) > also, yikes! Yeah, the nouveau made the numbers bigger - but we have a real user! --Mika