From patchwork Fri Aug 24 19:25:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jerome Glisse X-Patchwork-Id: 10575697 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 76A04112E for ; Fri, 24 Aug 2018 19:25:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 59D302BA85 for ; Fri, 24 Aug 2018 19:25:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4B8182BAE7; Fri, 24 Aug 2018 19:25:56 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C79422BA85 for ; Fri, 24 Aug 2018 19:25:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E99F86B3130; Fri, 24 Aug 2018 15:25:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id E20796B312E; Fri, 24 Aug 2018 15:25:53 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D0F9A6B312F; Fri, 24 Aug 2018 15:25:53 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-qt0-f197.google.com (mail-qt0-f197.google.com [209.85.216.197]) by kanga.kvack.org (Postfix) with ESMTP id A1CFC6B312C for ; Fri, 24 Aug 2018 15:25:53 -0400 (EDT) Received: by mail-qt0-f197.google.com with SMTP id e88-v6so8958583qtb.1 for ; Fri, 24 Aug 2018 12:25:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-original-authentication-results:x-gm-message-state:from:to:cc :subject:date:message-id:mime-version:content-transfer-encoding; bh=XPma3sOhewHNuc0IafAoCqwqQs0vfsJHUD5y5g3h4xc=; b=PkurhJmsKgyp+vIjrBK80vpRH//Y2BMUgAdPWqTuTkCSdsWQ6S7zR8kJqDWfQiirpk Ei4pJbaxz15WtFDATRcUhRn8SNEobODOIhX7sT6dDqxSNnRCehKiOQQ9ELOwIWti6I8U V4Z87NmWWyz8ofmzpk5c29fhuhTJijjz7mP5928YUW47rY4JHuEgHs9DJapoH9nsZG6U QpZxFj6ZrSdYP9rLUiUDRpDF3QoJNfSu+pDyXb+bEDH88+VaPg7hUpDct1wNssV/sHyw KuJbBB6SYM25rL5eYLmiBQzG2q58KR0Wc+cFSbLgyfCWUQpKjzJmFLAf1IuqF0AMopDT 7+UA== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of jglisse@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=jglisse@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com X-Gm-Message-State: APzg51CmDLahIV4nuF8CDwvpO9aBioRWYjogXzVXBjMQUQgahhzpO3TG zKBJ87hP2PkzBAo+ni0dP9RC+SuVYYTYbSXnxnxqPyPT8/8Ka2DncUSY97ON5DgnWCutTt5WlcS lZcI8MliEblpTkIPy4R5SIM4iafL+ahqrF7zHCZiUacMz6Lw/bG6r88wt4RJRWcmWPQ== X-Received: by 2002:a37:6292:: with SMTP id w140-v6mr3214583qkb.258.1535138753407; Fri, 24 Aug 2018 12:25:53 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZsQHex0k2pLQhiPmyQltfwRdp92KkKVl4Cv/w8fL5PLmLwW6uI672UOkFbEHx8gQ4PKN1M X-Received: by 2002:a37:6292:: with SMTP id w140-v6mr3214528qkb.258.1535138752706; Fri, 24 Aug 2018 12:25:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535138752; cv=none; d=google.com; s=arc-20160816; b=OKGFtR+15haLI8ph0hbeFNnaVWtXeP15CRIr1fJVFVfVbsCtzh5ypaxlQftVPJHTVz W3OjnOAMpmHKUQn4P9NbhGDnZWjldeLINFXibSluoiI7bET8fafluP2CyIvzAoUK0zgJ 57pfBI3PkCVdKQDmWDer0LOVvs7DNJW1zQr5KEuhTY2SqHTzRXJgg0ouhTy1UIZnN+Sk TubEjNCrx4KbGNU5FMiBeZyvYHAoT1LGJASoGE41FJWeTP294DP+ACpx/67XS6I+d3Ij Bahniz++OKsfJERXwZqLZ+rHoIsAkiXxNY8Bqlyd6EWHvkLEB667G8EIRoUduPW83lGi M2+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:arc-authentication-results; bh=XPma3sOhewHNuc0IafAoCqwqQs0vfsJHUD5y5g3h4xc=; b=drpFUluaHd9cUhpfniPi4rJfKiWPMF9S+zEha2AC+JXkwefj7yE3Cijyhq63fOWGH8 RmJ1vcj95KDwf9iAU5B2lhJVNNvAw2G2KUhFSjTGIHTafnGLclNf6nUPAVZ+CsvVT7hO k9L6ux9lWFnr8Ebi95qED33ddDj83xJ9QIaaYsbc/XpF5R7NutYASFlQFp/PY92lQhv6 kb+Rf1kcP7lKAUbnmPtRBN3FjolEpRT4BKJ+OOEeh7eTJZolAb46V1MZ3UnWUEyzjNds pJ8b4uBU9YchicAywz50AQEI/DJhrl238ASH+BaMtCQRxGBdjyRn5xUEICx0vEt6zsFo TE/g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of jglisse@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=jglisse@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from mx1.redhat.com (mx3-rdu2.redhat.com. [66.187.233.73]) by mx.google.com with ESMTPS id x26-v6si2808812qtj.366.2018.08.24.12.25.52 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 24 Aug 2018 12:25:52 -0700 (PDT) Received-SPF: pass (google.com: domain of jglisse@redhat.com designates 66.187.233.73 as permitted sender) client-ip=66.187.233.73; Authentication-Results: mx.google.com; spf=pass (google.com: domain of jglisse@redhat.com designates 66.187.233.73 as permitted sender) smtp.mailfrom=jglisse@redhat.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 323A2804B9F4; Fri, 24 Aug 2018 19:25:52 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-122-125.rdu2.redhat.com [10.10.122.125]) by smtp.corp.redhat.com (Postfix) with ESMTP id B377D2026D6D; Fri, 24 Aug 2018 19:25:51 +0000 (UTC) From: jglisse@redhat.com To: linux-mm@kvack.org Cc: Andrew Morton , linux-kernel@vger.kernel.org, =?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= Subject: [PATCH 0/7] HMM updates, improvements and fixes Date: Fri, 24 Aug 2018 15:25:42 -0400 Message-Id: <20180824192549.30844-1-jglisse@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 24 Aug 2018 19:25:52 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 24 Aug 2018 19:25:52 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'jglisse@redhat.com' RCPT:'' X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP From: Jérôme Glisse Few fixes that only affect HMM users. Improve the synchronization call back so that we match was other mmu_notifier listener do and add proper support to the new blockable flags in the process. For curious folks here are branches to leverage HMM in various existing device drivers: https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-nouveau-v01 https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-radeon-v00 https://cgit.freedesktop.org/~glisse/linux/log/?h=hmm-intel-v00 More to come (amd gpu, Mellanox, ...) I expect more of the preparatory work for nouveau will be merge in 4.20 (like we have been doing since 4.16) and i will wait until this patchset is upstream before pushing the patches that actualy make use of HMM (to avoid complex tree inter-dependency). Jérôme Glisse (5): mm/hmm: fix utf8 ... mm/hmm: properly handle migration pmd mm/hmm: use a structure for update callback parameters mm/hmm: invalidate device page table at start of invalidation mm/hmm: proper support for blockable mmu_notifier Ralph Campbell (2): mm/rmap: map_pte() was not handling private ZONE_DEVICE page properly mm/hmm: fix race between hmm_mirror_unregister() and mmu_notifier callback include/linux/hmm.h | 37 +++++++---- mm/hmm.c | 150 ++++++++++++++++++++++++++++++------------- mm/page_vma_mapped.c | 9 +++ 3 files changed, 142 insertions(+), 54 deletions(-)