Show a cover letter.

GET /api/covers/808432/?format=api
HTTP 200 OK
Allow: GET, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 808432,
    "url": "http://patchwork.ozlabs.org/api/covers/808432/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/cover/20170831211738.17922-1-jglisse@redhat.com/",
    "project": {
        "id": 2,
        "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api",
        "name": "Linux PPC development",
        "link_name": "linuxppc-dev",
        "list_id": "linuxppc-dev.lists.ozlabs.org",
        "list_email": "linuxppc-dev@lists.ozlabs.org",
        "web_url": "https://github.com/linuxppc/wiki/wiki",
        "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git",
        "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/",
        "list_archive_url": "https://lore.kernel.org/linuxppc-dev/",
        "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/",
        "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}"
    },
    "msgid": "<20170831211738.17922-1-jglisse@redhat.com>",
    "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170831211738.17922-1-jglisse@redhat.com/",
    "date": "2017-08-31T21:17:25",
    "name": "[00/13] mmu_notifier kill invalidate_page callback v2",
    "submitter": {
        "id": 71451,
        "url": "http://patchwork.ozlabs.org/api/people/71451/?format=api",
        "name": "Jerome Glisse",
        "email": "jglisse@redhat.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/cover/20170831211738.17922-1-jglisse@redhat.com/mbox/",
    "series": [
        {
            "id": 910,
            "url": "http://patchwork.ozlabs.org/api/series/910/?format=api",
            "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=910",
            "date": "2017-08-31T21:17:25",
            "name": "mmu_notifier kill invalidate_page callback v2",
            "version": 1,
            "mbox": "http://patchwork.ozlabs.org/series/910/mbox/"
        }
    ],
    "comments": "http://patchwork.ozlabs.org/api/covers/808432/comments/",
    "headers": {
        "Return-Path": "<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>",
        "X-Original-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork-incoming@ozlabs.org",
            "linuxppc-dev@lists.ozlabs.org"
        ],
        "Received": [
            "from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xjwHR38TJz9s06\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 07:19:31 +1000 (AEST)",
            "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xjwHR0XkkzDqZ0\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  1 Sep 2017 07:19:31 +1000 (AEST)",
            "from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xjwFT49WpzDqXj\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  1 Sep 2017 07:17:49 +1000 (AEST)",
            "from smtp.corp.redhat.com\n\t(int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 76EF36147A;\n\tThu, 31 Aug 2017 21:17:46 +0000 (UTC)",
            "from localhost.localdomain.com (ovpn-120-38.rdu2.redhat.com\n\t[10.10.120.38])\n\tby smtp.corp.redhat.com (Postfix) with ESMTP id AD13A5D9CB;\n\tThu, 31 Aug 2017 21:17:42 +0000 (UTC)"
        ],
        "DMARC-Filter": "OpenDMARC Filter v1.3.2 mx1.redhat.com 76EF36147A",
        "Authentication-Results": [
            "ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com",
            "ext-mx10.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=jglisse@redhat.com"
        ],
        "From": "jglisse@redhat.com",
        "To": "linux-mm@kvack.org",
        "Subject": "[PATCH 00/13] mmu_notifier kill invalidate_page callback v2",
        "Date": "Thu, 31 Aug 2017 17:17:25 -0400",
        "Message-Id": "<20170831211738.17922-1-jglisse@redhat.com>",
        "MIME-Version": "1.0",
        "Content-Type": "text/plain; charset=UTF-8",
        "Content-Transfer-Encoding": "8bit",
        "X-Scanned-By": "MIMEDefang 2.79 on 10.5.11.14",
        "X-Greylist": "Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.39]); Thu, 31 Aug 2017 21:17:46 +0000 (UTC)",
        "X-BeenThere": "linuxppc-dev@lists.ozlabs.org",
        "X-Mailman-Version": "2.1.23",
        "Precedence": "list",
        "List-Id": "Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>",
        "List-Unsubscribe": "<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://lists.ozlabs.org/pipermail/linuxppc-dev/>",
        "List-Post": "<mailto:linuxppc-dev@lists.ozlabs.org>",
        "List-Help": "<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>",
        "List-Subscribe": "<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>",
        "Cc": "Andrea Arcangeli <aarcange@redhat.com>, Joerg Roedel <jroedel@suse.de>,\n\tkvm@vger.kernel.org, =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?=\n\t<rkrcmar@redhat.com>, linux-rdma@vger.kernel.org,\n\tlinuxppc-dev@lists.ozlabs.org, Jack Steiner <steiner@sgi.com>,\n\tlinux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,\n\tSudeep Dutt <sudeep.dutt@intel.com>, Ashutosh Dixit\n\t<ashutosh.dixit@intel.com>, iommu@lists.linux-foundation.org, \n\t=?utf-8?b?SsOpcsO0bWUgR2xpc3Nl?= <jglisse@redhat.com>,\n\tDimitri Sivanich <sivanich@sgi.com>, amd-gfx@lists.freedesktop.org, \n\txen-devel@lists.xenproject.org, Paolo Bonzini <pbonzini@redhat.com>, \n\tAndrew Morton <akpm@linux-foundation.org>, Linus Torvalds\n\t<torvalds@linux-foundation.org>, \n\tDan Williams <dan.j.williams@intel.com>, \"Kirill A . Shutemov\"\n\t<kirill.shutemov@linux.intel.com>",
        "Errors-To": "linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org",
        "Sender": "\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"
    },
    "content": "From: Jérôme Glisse <jglisse@redhat.com>\n\n(Sorry for so many list cross-posting and big cc)\n\nChanges since v1:\n  - remove more dead code in kvm (no testing impact)\n  - more accurate end address computation (patch 2)\n    in page_mkclean_one and try_to_unmap_one\n  - added tested-by/reviewed-by gotten so far\n\nTested as both host and guest kernel with KVM nothing is burning yet.\n\nPrevious cover letter:\n\n\nPlease help testing !\n\nThe invalidate_page callback suffered from 2 pitfalls. First it used to\nhappen after page table lock was release and thus a new page might have\nbeen setup for the virtual address before the call to invalidate_page().\n\nThis is in a weird way fixed by c7ab0d2fdc840266b39db94538f74207ec2afbf6\nwhich moved the callback under the page table lock. Which also broke\nseveral existing user of the mmu_notifier API that assumed they could\nsleep inside this callback.\n\nThe second pitfall was invalidate_page being the only callback not taking\na range of address in respect to invalidation but was giving an address\nand a page. Lot of the callback implementer assumed this could never be\nTHP and thus failed to invalidate the appropriate range for THP pages.\n\nBy killing this callback we unify the mmu_notifier callback API to always\ntake a virtual address range as input.\n\nThere is now 2 clear API (I am not mentioning the youngess API which is\nseldomly used):\n  - invalidate_range_start()/end() callback (which allow you to sleep)\n  - invalidate_range() where you can not sleep but happen right after\n    page table update under page table lock\n\n\nNote that a lot of existing user feels broken in respect to range_start/\nrange_end. Many user only have range_start() callback but there is nothing\npreventing them to undo what was invalidated in their range_start() callback\nafter it returns but before any CPU page table update take place.\n\nThe code pattern use in kvm or umem odp is an example on how to properly\navoid such race. In a nutshell use some kind of sequence number and active\nrange invalidation counter to block anything that might undo what the\nrange_start() callback did.\n\nIf you do not care about keeping fully in sync with CPU page table (ie\nyou can live with CPU page table pointing to new different page for a\ngiven virtual address) then you can take a reference on the pages inside\nthe range_start callback and drop it in range_end or when your driver\nis done with those pages.\n\nLast alternative is to use invalidate_range() if you can do invalidation\nwithout sleeping as invalidate_range() callback happens under the CPU\npage table spinlock right after the page table is updated.\n\n\nNote this is barely tested. I intend to do more testing of next few days\nbut i do not have access to all hardware that make use of the mmu_notifier\nAPI.\n\n\nFirst 2 patches convert existing call of mmu_notifier_invalidate_page()\nto mmu_notifier_invalidate_range() and bracket those call with call to\nmmu_notifier_invalidate_range_start()/end().\n\nThe next 10 patches remove existing invalidate_page() callback as it can\nno longer happen.\n\nFinaly the last page remove it completely so it can RIP.\n\nJérôme Glisse (13):\n  dax: update to new mmu_notifier semantic\n  mm/rmap: update to new mmu_notifier semantic\n  powerpc/powernv: update to new mmu_notifier semantic\n  drm/amdgpu: update to new mmu_notifier semantic\n  IB/umem: update to new mmu_notifier semantic\n  IB/hfi1: update to new mmu_notifier semantic\n  iommu/amd: update to new mmu_notifier semantic\n  iommu/intel: update to new mmu_notifier semantic\n  misc/mic/scif: update to new mmu_notifier semantic\n  sgi-gru: update to new mmu_notifier semantic\n  xen/gntdev: update to new mmu_notifier semantic\n  KVM: update to new mmu_notifier semantic\n  mm/mmu_notifier: kill invalidate_page\n\nCc: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Andrew Morton <akpm@linux-foundation.org>\nCc: Andrea Arcangeli <aarcange@redhat.com>\nCc: Joerg Roedel <jroedel@suse.de>\nCc: Dan Williams <dan.j.williams@intel.com>\nCc: Sudeep Dutt <sudeep.dutt@intel.com>\nCc: Ashutosh Dixit <ashutosh.dixit@intel.com>\nCc: Dimitri Sivanich <sivanich@sgi.com>\nCc: Jack Steiner <steiner@sgi.com>\nCc: Paolo Bonzini <pbonzini@redhat.com>\nCc: Radim Krčmář <rkrcmar@redhat.com>\n\nCc: linuxppc-dev@lists.ozlabs.org\nCc: dri-devel@lists.freedesktop.org\nCc: amd-gfx@lists.freedesktop.org\nCc: linux-rdma@vger.kernel.org\nCc: iommu@lists.linux-foundation.org\nCc: xen-devel@lists.xenproject.org\nCc: kvm@vger.kernel.org\n\nJérôme Glisse (13):\n  dax: update to new mmu_notifier semantic\n  mm/rmap: update to new mmu_notifier semantic v2\n  powerpc/powernv: update to new mmu_notifier semantic\n  drm/amdgpu: update to new mmu_notifier semantic\n  IB/umem: update to new mmu_notifier semantic\n  IB/hfi1: update to new mmu_notifier semantic\n  iommu/amd: update to new mmu_notifier semantic\n  iommu/intel: update to new mmu_notifier semantic\n  misc/mic/scif: update to new mmu_notifier semantic\n  sgi-gru: update to new mmu_notifier semantic\n  xen/gntdev: update to new mmu_notifier semantic\n  KVM: update to new mmu_notifier semantic v2\n  mm/mmu_notifier: kill invalidate_page\n\n arch/arm/include/asm/kvm_host.h          |  6 -----\n arch/arm64/include/asm/kvm_host.h        |  6 -----\n arch/mips/include/asm/kvm_host.h         |  5 ----\n arch/powerpc/include/asm/kvm_host.h      |  5 ----\n arch/powerpc/platforms/powernv/npu-dma.c | 10 --------\n arch/x86/include/asm/kvm_host.h          |  2 --\n arch/x86/kvm/x86.c                       | 11 ---------\n drivers/gpu/drm/amd/amdgpu/amdgpu_mn.c   | 31 -----------------------\n drivers/infiniband/core/umem_odp.c       | 19 ---------------\n drivers/infiniband/hw/hfi1/mmu_rb.c      |  9 -------\n drivers/iommu/amd_iommu_v2.c             |  8 ------\n drivers/iommu/intel-svm.c                |  9 -------\n drivers/misc/mic/scif/scif_dma.c         | 11 ---------\n drivers/misc/sgi-gru/grutlbpurge.c       | 12 ---------\n drivers/xen/gntdev.c                     |  8 ------\n fs/dax.c                                 | 19 +++++++++------\n include/linux/mm.h                       |  1 +\n include/linux/mmu_notifier.h             | 25 -------------------\n mm/memory.c                              | 26 ++++++++++++++++----\n mm/mmu_notifier.c                        | 14 -----------\n mm/rmap.c                                | 35 +++++++++++++++++++++++---\n virt/kvm/kvm_main.c                      | 42 --------------------------------\n 22 files changed, 65 insertions(+), 249 deletions(-)"
}