From patchwork Thu Sep 13 02:22:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 10598647 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 4B9AB15E2 for ; Thu, 13 Sep 2018 02:33:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3A2DA2992E for ; Thu, 13 Sep 2018 02:33:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2DFEB29BB3; Thu, 13 Sep 2018 02:33:48 +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 B26E42992E for ; Thu, 13 Sep 2018 02:33:47 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6BA048E0002; Wed, 12 Sep 2018 22:33:46 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 6699E8E0001; Wed, 12 Sep 2018 22:33:46 -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 581CF8E0002; Wed, 12 Sep 2018 22:33:46 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) by kanga.kvack.org (Postfix) with ESMTP id 1BC568E0001 for ; Wed, 12 Sep 2018 22:33:46 -0400 (EDT) Received: by mail-pg1-f198.google.com with SMTP id r20-v6so1808568pgv.20 for ; Wed, 12 Sep 2018 19:33:46 -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:subject:from :to:cc:date:message-id:user-agent:mime-version :content-transfer-encoding; bh=YGg4W0aTgzDm0eD57OKz7ioFnKDgmbMILn9KKzEb/ds=; b=iGcCrGStRF6Rb+2F6FAzVaLCbppXfd4XNBVEf8sBCLW+ph+m5CsV9AR7PHgI99EhnE gEdqhXdR3eXMiyDxJLA00aYbV1P3VSAE0JVx9TqZIBNOwN7b+my5xM2dQIabldbU6V6a GBbHF8RD2oBpg9pV3yUUGMoQ+TBjZKy/wJ8PNt5SI3J0XbaKs+Fj2WHU/S/IMuSG6lzU CSf7fcmoVZkkN8t0EbEhRKwTLJ4ZssixzRgG3014fzKdjcTJbqbiO8xksfRTdSeh86K+ JFBMpucuKjNyfHXCQQwdsdc2UQyAtDoEjxYp6Shkf9IYQjxd+LREjORg0Zc7c0iUs6L2 dTdw== X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Gm-Message-State: APzg51B23TOwAP/X+pOLQaPgI7qoaLjLN8JKV63XL0SzqUcGkI7qBD21 kfxG8BUpHede5m7CKlBoMeMLS1Nm8SEFg6RW8QAOwAnHAk5MTOib6B2gGI/FieRrZvl1chLzcSD OBRACSQI2sr4IRjHGSd5BqRJ9g8B6qMvD6QE0/nOonP9X8kAKMkJdqt8R2TmCpzMFNg== X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr4946837pgp.334.1536806025756; Wed, 12 Sep 2018 19:33:45 -0700 (PDT) X-Google-Smtp-Source: ANB0VdYUTOkLY63uuVRmEOxKfnAI3MZEW2MyX1lvwt79FrdpQ5ttronPHNbm/ccJh6ezlqNMHSoH X-Received: by 2002:a65:40cd:: with SMTP id u13-v6mr4946790pgp.334.1536806024556; Wed, 12 Sep 2018 19:33:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536806024; cv=none; d=google.com; s=arc-20160816; b=PUF59Y3hU2G94VEpoh6szujeC/S5b4Q3nGdm3sy0J37h4vq2nP5aPmRY3gcxuAY/CK jC9hPkjpRCO9cWLslHHWrCFgC+X/zqNaMFi3LzAPQAZVSGHeWRlyn9cbsTKQMpytmkgb J+YfKPHss0UXgNe9DWmj+wmeVpYEw61/9nYJYjUBqfYBnvVzG94Ka6O52tCRafCnp1cW q69DIQPHNcFqnKoiY0U2zcYpsBa9BxamaFaW+5EJmWEthIfo7OJN07n/anMs2tcpc7Gl r9xKgqonftnJQ8c3G2ZTkekE71r7QkxY0JS1bR2DZu8Boxjv8IEAAT8u/gMx4WEfRWR/ 1PEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:user-agent:message-id:date :cc:to:from:subject; bh=YGg4W0aTgzDm0eD57OKz7ioFnKDgmbMILn9KKzEb/ds=; b=MEQoz7UPHlRzsbq38BM3elxbTiv0+TUH0qjDeTv8vV2BHkx5QjJ74LsrUgLNnUPCPY GIJ6gz0jcnGQOEBtaZ1ll4E+21w+f8EQdujlTMImqSX/m0QPm00yVF1Gt11Ar65dvqry 6ssjadxBQCLQgUPc56YnoJEwT+IHOGU6OwLrcVxe2jq3Aq+pt8Mr7Td4oJcfoKANbmla r6hM7ZGL5w8t2Z3rqWMNqgr8pyFoe9ctMYgmeTqkg7UBmYinVbcf8toYcQZcL3A8HLx1 XX0k/VESqTzW8KosE+O/EZkV6+Qh/fjT+GcEPsePloI29FjDK9iVDZir8AIMKEryK1Np DrCQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from mga17.intel.com (mga17.intel.com. [192.55.52.151]) by mx.google.com with ESMTPS id 5-v6si2657044plx.27.2018.09.12.19.33.44 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Sep 2018 19:33:44 -0700 (PDT) Received-SPF: pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) client-ip=192.55.52.151; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dan.j.williams@intel.com designates 192.55.52.151 as permitted sender) smtp.mailfrom=dan.j.williams@intel.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 12 Sep 2018 19:33:43 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.53,367,1531810800"; d="scan'208";a="85535756" Received: from dwillia2-desk3.jf.intel.com (HELO dwillia2-desk3.amr.corp.intel.com) ([10.54.39.16]) by fmsmga002.fm.intel.com with ESMTP; 12 Sep 2018 19:33:42 -0700 Subject: [PATCH v5 0/7] mm: Merge hmm into devm_memremap_pages, mark GPL-only From: Dan Williams To: akpm@linux-foundation.org Cc: stable@vger.kernel.org, Logan Gunthorpe , Christoph Hellwig , =?utf-8?b?SsOpcsO0bWU=?= Glisse , Michal Hocko , alexander.h.duyck@intel.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Date: Wed, 12 Sep 2018 19:22:00 -0700 Message-ID: <153680531988.453305.8080706591516037706.stgit@dwillia2-desk3.amr.corp.intel.com> User-Agent: StGit/0.18-2-gc94f MIME-Version: 1.0 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 Changes since v4 [1]: * Rebase on v4.19-rc3 * Update changelogs and cover letter [1]: https://lkml.org/lkml/2018/7/11/14 --- Hi Andrew, Back from vacation and this series is still top of mind. devm_memremap_pages() is a facility that can create struct page entries for any arbitrary range and give drivers the ability to subvert core aspects of page management. It, and anything derived from it (e.g. hmm, pcip2p, etc...), is an EXPORT_SYMBOL_GPL() interface. I see that commit 31c5bda3a656 "mm: fix exports that inadvertently make put_page() EXPORT_SYMBOL_GPL" was merged ahead of this series to relieve some of the pressure from innocent consumers of put_page(), but now we need this series to address *producers* of device pages. More details and justification in the changelogs. The 0day infrastructure has reported success across 182 configs and this survives the libnvdimm unit test suite. Aside from the controversial bits the diffstat is compelling at: 7 files changed, 138 insertions(+), 328 deletions(-). Note that the series has some minor collisions with Alex's recent series to improve devm_memremap_pages() scalability [2]. So, whichever you take first the other will need a minor rebase. [2]: https://www.lkml.org/lkml/2018/9/11/10 --- Dan Williams (7): mm, devm_memremap_pages: Mark devm_memremap_pages() EXPORT_SYMBOL_GPL mm, devm_memremap_pages: Kill mapping "System RAM" support mm, devm_memremap_pages: Fix shutdown handling mm, devm_memremap_pages: Add MEMORY_DEVICE_PRIVATE support mm, hmm: Use devm semantics for hmm_devmem_{add,remove} mm, hmm: Replace hmm_devmem_pages_create() with devm_memremap_pages() mm, hmm: Mark hmm_devmem_{add,add_resource} EXPORT_SYMBOL_GPL drivers/dax/pmem.c | 15 -- drivers/nvdimm/pmem.c | 18 +- include/linux/hmm.h | 4 include/linux/memremap.h | 7 + kernel/memremap.c | 98 ++++++++---- mm/hmm.c | 303 +++++-------------------------------- tools/testing/nvdimm/test/iomap.c | 21 ++- 7 files changed, 138 insertions(+), 328 deletions(-)