From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9E587C433F5 for ; Tue, 8 Feb 2022 03:03:41 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id F22366B0074; Mon, 7 Feb 2022 22:03:40 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id ED0A56B0075; Mon, 7 Feb 2022 22:03:40 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DBFC66B0078; Mon, 7 Feb 2022 22:03:40 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0103.hostedemail.com [216.40.44.103]) by kanga.kvack.org (Postfix) with ESMTP id CB6CD6B0074 for ; Mon, 7 Feb 2022 22:03:40 -0500 (EST) Received: from smtpin31.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 809F48249980 for ; Tue, 8 Feb 2022 03:03:40 +0000 (UTC) X-FDA: 79118117400.31.EEFB902 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf23.hostedemail.com (Postfix) with ESMTP id B3AB7140007 for ; Tue, 8 Feb 2022 03:03:39 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.57]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4Jt78W1rN6z9rvT; Tue, 8 Feb 2022 11:02:03 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.21; Tue, 8 Feb 2022 11:03:33 +0800 Subject: Re: start sorting out the ZONE_DEVICE refcount mess To: Christoph Hellwig CC: Felix Kuehling , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= , "Pan, Xinhui" , Ben Skeggs , Karol Herbst , Lyude Paul , Jason Gunthorpe , Alistair Popple , Logan Gunthorpe , Ralph Campbell , , , , , , , Andrew Morton , Dan Williams References: <20220207063249.1833066-1-hch@lst.de> From: Miaohe Lin Message-ID: <8efd8321-8f0b-e5c3-8837-b0fe62f36c14@huawei.com> Date: Tue, 8 Feb 2022 11:03:32 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: <20220207063249.1833066-1-hch@lst.de> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: B3AB7140007 X-Rspam-User: Authentication-Results: imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com X-Stat-Signature: f37dqt8445p5so4m64p9sn4xjfsd8akk X-Rspamd-Server: rspam04 X-HE-Tag: 1644289419-876008 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: On 2022/2/7 14:32, Christoph Hellwig wrote: > Hi all, > > this series removes the offset by one refcount for ZONE_DEVICE pages > that are freed back to the driver owning them, which is just device > private ones for now, but also the planned device coherent pages > and the ehanced p2p ones pending. > Many thanks for doing this, I remember the hard time when I read the relevant code. :) > It does not address the fsdax pages yet, which will be attacked in a > follow on series. > > Diffstat: > arch/arm64/mm/mmu.c | 1 > arch/powerpc/kvm/book3s_hv_uvmem.c | 1 > drivers/gpu/drm/amd/amdkfd/kfd_migrate.c | 2 > drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 1 > drivers/gpu/drm/drm_cache.c | 2 > drivers/gpu/drm/nouveau/nouveau_dmem.c | 3 - > drivers/gpu/drm/nouveau/nouveau_svm.c | 1 > drivers/infiniband/core/rw.c | 1 > drivers/nvdimm/pmem.h | 1 > drivers/nvme/host/pci.c | 1 > drivers/nvme/target/io-cmd-bdev.c | 1 > fs/Kconfig | 2 > fs/fuse/virtio_fs.c | 1 > include/linux/hmm.h | 9 ---- > include/linux/memremap.h | 22 +++++++++- > include/linux/mm.h | 59 ++++------------------------- > lib/test_hmm.c | 4 + > mm/Kconfig | 4 - > mm/internal.h | 2 > mm/memcontrol.c | 11 +---- > mm/memremap.c | 63 ++++++++++++++++--------------- > mm/migrate.c | 6 -- > mm/swap.c | 49 ++---------------------- > 23 files changed, 90 insertions(+), 157 deletions(-) > > . >