Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp10643242ybi; Thu, 25 Jul 2019 02:58:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzQGAJTKCYeuHBPXQlo+su0NCumS0ttEd1fpqmpAYvFtThtSQ1/uhy94Hvmmk9fnOmuSVsp X-Received: by 2002:a17:902:1101:: with SMTP id d1mr45867889pla.212.1564048705418; Thu, 25 Jul 2019 02:58:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564048705; cv=none; d=google.com; s=arc-20160816; b=n3yTOPsmJkkLrZUjdQzVP6kAm+QsZHiK16Cc/Sq6HJAx3WdHabb32lXmA4rMY2hJBo kjmTPLUiM3g4BafFPRpjhXgDEJFp1HDB9FO35NcB5Vcj8QOmPU9aWWQ/M4snAz5c2ny5 RQsWhIqgXi2aGSkApYAQv8o2RKwf/BGDf1VfssTfBtMV795OcjbNX5A5Dimv9urkSm0b lrkE6en3eRDtiG5Ha2cZ59Jw+UmjJkFiVGOijtAkFG7fo3JmF5tnOBsTNVXBvpsD5RM+ ldWDEnHfeNoLgyHaxd9EIWoiV3y66iD8EAh+gXJyrPhnwD3IJmULMzklzVxGGogbeGEl EbiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:dkim-signature:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=gTLfLpBBgzH14pN0OishW6D/G2zPoxenwkGRe8J45rs=; b=F813q+wduIYn9XK+A8AfwAuu2VKGp2O94XYKPBVeL0BT/4z10OA3MKhoSrWNvloaX3 +lvorNGo7R0nwolzyLKMHGzT1FSHVr/cmRCz3N8GST88z8pX1W6kbE9V5NM4UBkGEtip Phsv6j5iHR5G/zEGB2YarDI9kfsY0X4naYqGEV++5Bg1kmR5KBDaUf7ipTtW75CDR+D3 HN6fJU887y6kIjHJ1IB29vlKiQXYOF8RpywwHb+WXaZQvCok60HKWjdh/SfnxRO1fZcI iMUHX3qGhh//tN7LnWdCvtONT6xniRTdZKxp3mNvngGH/7Ph8C+y1/vaz/rZHenyMYtV czPg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nvidia.com header.s=n1 header.b="mHFm/5BS"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g7si18514108plt.244.2019.07.25.02.58.06; Thu, 25 Jul 2019 02:58:25 -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=pass header.i=@nvidia.com header.s=n1 header.b="mHFm/5BS"; 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=pass (p=NONE sp=NONE dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729723AbfGXX1H (ORCPT + 99 others); Wed, 24 Jul 2019 19:27:07 -0400 Received: from hqemgate14.nvidia.com ([216.228.121.143]:15280 "EHLO hqemgate14.nvidia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729232AbfGXX1G (ORCPT ); Wed, 24 Jul 2019 19:27:06 -0400 Received: from hqpgpgate101.nvidia.com (Not Verified[216.228.121.13]) by hqemgate14.nvidia.com (using TLS: TLSv1.2, DES-CBC3-SHA) id ; Wed, 24 Jul 2019 16:27:06 -0700 Received: from hqmail.nvidia.com ([172.20.161.6]) by hqpgpgate101.nvidia.com (PGP Universal service); Wed, 24 Jul 2019 16:27:06 -0700 X-PGP-Universal: processed; by hqpgpgate101.nvidia.com on Wed, 24 Jul 2019 16:27:06 -0700 Received: from HQMAIL105.nvidia.com (172.20.187.12) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Wed, 24 Jul 2019 23:27:05 +0000 Received: from hqnvemgw01.nvidia.com (172.20.150.20) by HQMAIL105.nvidia.com (172.20.187.12) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Wed, 24 Jul 2019 23:27:05 +0000 Received: from rcampbell-dev.nvidia.com (Not Verified[10.110.48.66]) by hqnvemgw01.nvidia.com with Trustwave SEG (v7,5,8,10121) id ; Wed, 24 Jul 2019 16:27:05 -0700 From: Ralph Campbell To: CC: , Ralph Campbell Subject: [PATCH v3 0/3] mm/hmm: fixes for device private page migration Date: Wed, 24 Jul 2019 16:26:57 -0700 Message-ID: <20190724232700.23327-1-rcampbell@nvidia.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-NVConfidentiality: public Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1564010826; bh=gTLfLpBBgzH14pN0OishW6D/G2zPoxenwkGRe8J45rs=; h=X-PGP-Universal:From:To:CC:Subject:Date:Message-ID:X-Mailer: MIME-Version:X-NVConfidentiality:Content-Type: Content-Transfer-Encoding; b=mHFm/5BSNkpiIizmFlxJBFlZ5AY3WiRyFEePDr9oWQ473aDpCVLOrRoB6nx0KwvjS HYxtHV5bRdS23e6YHjzo2c+4shRrFMHOLx4DXn/XfeN/VXzFHKHJ3KcmukN5izfPyb pHTAlnOE1JXeN8ZEnA8uY3CFSvD4vUReVd21A/cehRYjo7rr8nZkwkZRgNDX5nKtok smxmGyZ/IUUAmmt6AVIAeIi1avYMjafvV4pQGVOwa3mtrI0if+Hf3GfcoNiNEivQgW LI/+XnVIJppguZ69lKQjgs9cAKna0rPAqcb1junJAQrye8vz3mCYu4dXF/xVJyE7xv JySHepvCjAlrA== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Testing the latest linux git tree turned up a few bugs with page migration to and from ZONE_DEVICE private and anonymous pages. Hopefully this series clarifies how ZONE_DEVICE private struct page uses the same mapping and index fields from the source anonymous page mapping. Changes from v2 to v3: Patch #1 is basically new (like v1 but with comments from v2) to accommodate Matthew Wilcox's NAK of v2 and Christoph's objection to adding _zd_pad fields in v1. Patch #2 adds reviewed-by Patch #3 adds comments explaining the reason for setting "subpage". Changes from v1 to v2: Patch #1 merges ZONE_DEVICE page struct into a union of lru and a struct for ZONE_DEVICE fields. So, basically a new patch. Patch #2 updates the code comments for clearing page->mapping as suggested by John Hubbard. Patch #3 is unchanged from the previous posting but note that Andrew Morton has v1 queued in v5.2-mmotm-2019-07-18-16-08. Ralph Campbell (3): mm: document zone device struct page reserved fields mm/hmm: fix ZONE_DEVICE anon page mapping reuse mm/hmm: Fix bad subpage pointer in try_to_unmap_one include/linux/mm_types.h | 9 ++++++++- kernel/memremap.c | 4 ++++ mm/rmap.c | 1 + 3 files changed, 13 insertions(+), 1 deletion(-) --=20 2.20.1