Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp487744ybl; Wed, 14 Aug 2019 01:00:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqzRzelqTf7nYExTB4N+EGUlVi3/+svx1167blJenyuAAcR8UGlQJYp2G/TutRDvMhZhyAqU X-Received: by 2002:a17:902:7c8a:: with SMTP id y10mr27188797pll.65.1565769635952; Wed, 14 Aug 2019 01:00:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565769635; cv=none; d=google.com; s=arc-20160816; b=VjFI1w22H4YGANYe/r9AzxlGaJG0fs0X2fml/4Fok+Uk+9YGpkl39iLPOWEOTPjTC8 MdETg70et2/BcPac/r11TbjsHlAZ+ftXB0qfra/nLPbXhocMMk71CibsQVm5xCSqz/Nw I/sPph97lz7yh25Lo82wD6WkxFga9x2Q5Irbbwh2dTQNEJaf+xH/PcMEka91eatYhBsw rambDoLHbIiWugMO5SgPbG21z9Cw//SWzrA+VODe2MLgWd4oAR430RDxEoB3bme1RJf0 JD+5D7vYDIsgXauQhx9i7Mr5wcnupzSFJht8wjPg26CUyJ3Z0MelBmRYicucd72mE/k/ xgog== 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=JVLupnHp/2HEL1nOJxPMzcGzWGTuwVGtB/+M404XJkE=; b=U7ABPGWgkH85bHOt+moPaP41I8TEVgGLcgX3V5YeDFlvupLDnTa9cPCEopewLQj6JQ f9O1zSK1VqKMKaCCsPZePYdZeG2aF4X8BbmHqGc92b5iRGLGNIDDSkwj23/6bCErn892 DkOiazyXs/i0PYC9oE3jRC9hA3QKf6AkbSHQTbvifqKHD14cQxhwPD12BOi43oVgZBDO plNG2sUI09gqq+Kpzgqn9RopYNPZlcRh3WYUj15MGdACuycMpKKjSUBgSYiZg/v/nFTG qn6zAUz6NYkahuxSAZ5Sl0srO+70xlVEE+P9HgYaX7L37Uj3eSlyDLXM6PsqGCPJpAht 1B3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JPKkluHX; 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 h30si2441337pjb.45.2019.08.14.01.00.20; Wed, 14 Aug 2019 01:00:35 -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=JPKkluHX; 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 S1727136AbfHNH7l (ORCPT + 99 others); Wed, 14 Aug 2019 03:59:41 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:38956 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726875AbfHNH7j (ORCPT ); Wed, 14 Aug 2019 03:59:39 -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=JVLupnHp/2HEL1nOJxPMzcGzWGTuwVGtB/+M404XJkE=; b=JPKkluHXANV3awUUpuvJcS5NT 5awHaFSwZn1/i0TJJtE3fi/qxiLHwIVJg48wdR8sIbS4qLVhXATdFK9VMQs4cbxoXMHMhxIyzbTUW 0KENQgeMZoxmA8wU4/XAyAYaABLnh5rNbE/HUxdzRZz6CSQRGkDRkDXwDWabLnEcXkLaW+l6V4Yoz iLKh8dBjzqUKUouq8fpd863K42hkg5zIJasXrCRyFOWrbQRYdR/zDvHLaOuRyPks+RztFhMjOfdiS w8QfISAZRlHzyPnXoWix4EEZp+XuxvvVxVkdvGQYuWDO3lYQqJlfIAs5ZQg2P7JkByBv8Ib0+w3Ry P4J23sxPA==; Received: from [2001:4bb8:180:1ec3:c70:4a89:bc61:2] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hxoBu-0007vG-RS; Wed, 14 Aug 2019 07:59:31 +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 v3 Date: Wed, 14 Aug 2019 09:59:18 +0200 Message-Id: <20190814075928.23766-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: 7 files changed, 282 insertions(+), 614 deletions(-) A git tree is also available at: git://git.infradead.org/users/hch/misc.git migrate_vma-cleanup.3 Gitweb: http://git.infradead.org/users/hch/misc.git/shortlog/refs/heads/migrate_vma-cleanup.3 Changes since v2: - don't unmap pages when returning 0 from nouveau_dmem_migrate_to_ram - minor style fixes - add a new patch to remove CONFIG_MIGRATE_VMA_HELPER 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