Received: by 2002:a25:b794:0:0:0:0:0 with SMTP id n20csp7043280ybh; Thu, 8 Aug 2019 09:20:48 -0700 (PDT) X-Google-Smtp-Source: APXvYqx0utUPXaIczXZTKMlNDpRbPAdHwzV7ZDUo9+mU4LW/iYKxvxJDe7vWAcsfl2YFPwegtiy8 X-Received: by 2002:aa7:9afc:: with SMTP id y28mr16081278pfp.252.1565281248450; Thu, 08 Aug 2019 09:20:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565281248; cv=none; d=google.com; s=arc-20160816; b=gKOoFLIj3tToGajmPXxpXC4JcsCrbuSM6qnPtfg5+BkiUl97PlzR7hsaP0//KC+J40 EzsuKihKiiMFe3Rke8U2o+4pcFRVvst5ujvIgYnlzbMpIuTfLOQOziQJYladF1Dv3t30 KbhXy5FNRrHcjN+GIvyxwDoVHaB/tnVIAkzzimWQY6ULFV0jz1qmzKNp2tzW8WdHu8mz jRcbt/P3kLm9/gRlkpJ+zR7ooN9bgPihdTPSe8Pr/XpOZW5vgqE2lkl+k2NcidXQqWYs M/25q8qoCw1SKTx/jU9lSvUcNz6xvAu1Ankb9b4lJOWLcjHVO60XaU1avb22ewNmXTKW HcJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=fPGllWDdh64nUfOs1aS3QjslyfGjQ/iJx/2zlaF/SN4=; b=AvyL7RQ8fxXsv/zndmS/1hDBdV1Q4Y4afcOQvUGO49Eu7Kaw0xd9vFi0Bk2c/O8nS2 Oe5mxbLr79JUHwSebrvwEJGU796KjqZry/8zaxiBR5D3/QlaMkqOQyWPaSn86GPqtktu qfH1x8DJ4q2j1LNZ4ajMhRMiX2eyiBWOGgA6rszrqZUqJuwp8RHfaMqFlPrzRfMz1E60 gtF017arhmn4R1WegCo/wUSqox3/VEf9wbS2yRXqfZIRI4HeQuYGC+6waANIi0bGYj9j l57SM8g7RooyLCtq7+cbGwl69RGf+VGKeKMZP8ALRWn2ETQUOB/5cy4vtjiOyeKBUnx7 CLgA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QTY7+sCw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m11si3028925pgq.267.2019.08.08.09.20.32; Thu, 08 Aug 2019 09:20:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=QTY7+sCw; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1733208AbfHHPd4 (ORCPT + 99 others); Thu, 8 Aug 2019 11:33:56 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:49556 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1733113AbfHHPdz (ORCPT ); Thu, 8 Aug 2019 11:33:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=fPGllWDdh64nUfOs1aS3QjslyfGjQ/iJx/2zlaF/SN4=; b=QTY7+sCwU0BZU2WjQGtou3n1/ RaWyLK5P/qG+bA80TktmQ4ddbXbYiDiqrC1m10wB4vGdGam/nfd3GWLHcEtUEQXnojGvCXInVqA8V ee1yHncvrQI8DqawF3fKeaPiDKYLwzb2rlkHGIWG2Xs56d6OFpVCrJmUTCDG0SVuabWVuZ5lSYg0f FDjUOR1WkYhep9qQgHGvKkYDcsTUS7X/VrMUXEneveGR/4KIexnaGhqwBecUTIRGg6gBkvx0TIs/F 7njM+Q1mXMwVT7z3jzQrcMNuZ6tshLHJqB3FYBJvinsQcaKKHi+5CfzC9KOjUE4EYU1F4tceKSDHo wImVvIJ8g==; Received: from [195.167.85.94] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hvkQG-0005A3-GY; Thu, 08 Aug 2019 15:33:48 +0000 From: Christoph Hellwig To: =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Jason Gunthorpe , Ben Skeggs Cc: Ralph Campbell , Bharata B Rao , Andrew Morton , linux-mm@kvack.org, nouveau@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: turn hmm migrate_vma upside down v2 Date: Thu, 8 Aug 2019 18:33:37 +0300 Message-Id: <20190808153346.9061-1-hch@lst.de> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jérôme, Ben and Jason, below is a series against the hmm tree which starts revamping the migrate_vma functionality. The prime idea is to export three slightly lower level functions and thus avoid the need for migrate_vma_ops callbacks. Diffstat: 5 files changed, 281 insertions(+), 607 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git migrate_vma-cleanup.2 Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/migrate_vma-cleanup.2 Changes since v1: - fix a few whitespace issues - drop the patch to remove MIGRATE_PFN_WRITE for now - various spelling fixes - clear cpages and npages in migrate_vma_setup - fix the nouveau_dmem_fault_copy_one return value - minor improvements to some nouveau internal calling conventions