Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4874191imu; Tue, 29 Jan 2019 08:57:19 -0800 (PST) X-Google-Smtp-Source: ALg8bN6KrEeQ5/4GbEeiYKUdZS4SO5NVLB/AnRnfzEB+6bZs58cTo6naPmE+I39NzEeelXPnqeBS X-Received: by 2002:a63:374e:: with SMTP id g14mr24883924pgn.59.1548781039092; Tue, 29 Jan 2019 08:57:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548781039; cv=none; d=google.com; s=arc-20160816; b=L0K/V9Ap4PuUGL4QNypHj2l9mQ5gL+iCXOUEiQBFfwl8JasK8Jlor/e3XQotB0vjQ/ R8L7WMmc1P1EO1s36jL6UCy/JYoEvg5cXU+b68b3gc5GmbU8FUih4jZ6qFuluKTMG1u3 XEzHOLY6/sDfAdIYyaoCmZ56jQmaophfQK5Y0mDmSP3qeXynWr/oEz12lI63nIIPmOaU qfiImP13uIarOwtD3RcubLmbevzl/Je81Ri1fVswOzcvHpBbFxx6ML5oJ2vQBW2paFu6 aCBKPvMpI1xGjggxo+O0Wig7qgCa7g8C6FUFOUdk2LkAUXO4ACGg1RzuQpLbtc4SIwVr 3i4Q== 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; bh=6qZJ9FGK6M6T3WrHuVkIvc+3dyZ5WXldhn9HnJDuq/A=; b=cYbJR5cI4gq4Zu8f99P4NNp+9jUwSlrPUWCadFV8rj2uqTcr4S9mC1MWkYyJ1Sdo4e Wzeyp2z6mWCUfJjoJGOAnrztJFV37el03H+GOv/K5sKTHzIYgJ27vj3XlMaonfCOn5iE 42lncRVN3iL9uwsblk2bhb9VVENP1QYrWQm9B6tvEy3FxBtA7bODsYkwnC0eX9ULvlxy qWF/b6GeC86MUPHMds3OS1v4zEr/WfF0xwjBg2oaPSE+AbkU0PGK8LiUIHkIgcSAwHf2 kdMnBRPFLWpok2fRACmzdsap7bCTGle7bj2U3wmos8CP+lphp5sR4M6l8sbxl6VUgHYB UTpw== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cb1si25608212plb.37.2019.01.29.08.57.03; Tue, 29 Jan 2019 08:57:19 -0800 (PST) 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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728430AbfA2Qyj (ORCPT + 99 others); Tue, 29 Jan 2019 11:54:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:63803 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728233AbfA2Qyi (ORCPT ); Tue, 29 Jan 2019 11:54:38 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2D4CA81F09; Tue, 29 Jan 2019 16:54:38 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-2.rdu2.redhat.com [10.10.122.2]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9E319102BCEB; Tue, 29 Jan 2019 16:54:36 +0000 (UTC) From: jglisse@redhat.com To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, =?UTF-8?q?J=C3=A9r=C3=B4me=20Glisse?= , Andrew Morton , Felix Kuehling , =?UTF-8?q?Christian=20K=C3=B6nig?= , Ralph Campbell , John Hubbard , Jason Gunthorpe , Dan Williams Subject: [PATCH 00/10] HMM updates for 5.1 Date: Tue, 29 Jan 2019 11:54:18 -0500 Message-Id: <20190129165428.3931-1-jglisse@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 29 Jan 2019 16:54:38 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jérôme Glisse This patchset improves the HMM driver API and add support for hugetlbfs and DAX mirroring. The improvement motivation was to make the ODP to HMM conversion easier [1]. Because we have nouveau bits schedule for 5.1 and to avoid any multi-tree synchronization this patchset adds few lines of inline function that wrap the existing HMM driver API to the improved API. The nouveau driver was tested before and after this patchset and it builds and works on both case so there is no merging issue [2]. The nouveau bit are queue up for 5.1 so this is why i added those inline. If this get merge in 5.1 the plans is to merge the HMM to ODP in 5.2 or 5.3 if testing shows any issues (so far no issues has been found with limited testing but Mellanox will be running heavier testing for longer time). To avoid spamming mm i would like to not cc mm on ODP or nouveau patches, however if people prefer to see those on mm mailing list then i can keep it cced. This is also what i intend to use as a base for AMD and Intel patches (v2 with more thing of some rfc which were already posted in the past). [1] https://cgit.freedesktop.org/~glisse/linux/log/?h=odp-hmm [2] https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-for-5.1 Cc: Andrew Morton Cc: Felix Kuehling Cc: Christian König Cc: Ralph Campbell Cc: John Hubbard Cc: Jason Gunthorpe Cc: Dan Williams Jérôme Glisse (10): mm/hmm: use reference counting for HMM struct mm/hmm: do not erase snapshot when a range is invalidated mm/hmm: improve and rename hmm_vma_get_pfns() to hmm_range_snapshot() mm/hmm: improve and rename hmm_vma_fault() to hmm_range_fault() mm/hmm: improve driver API to work and wait over a range mm/hmm: add default fault flags to avoid the need to pre-fill pfns arrays. mm/hmm: add an helper function that fault pages and map them to a device mm/hmm: support hugetlbfs (snap shoting, faulting and DMA mapping) mm/hmm: allow to mirror vma of a file on a DAX backed filesystem mm/hmm: add helpers for driver to safely take the mmap_sem include/linux/hmm.h | 290 ++++++++++-- mm/hmm.c | 1060 +++++++++++++++++++++++++++++-------------- 2 files changed, 983 insertions(+), 367 deletions(-) -- 2.17.2