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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1031DC433F5 for ; Tue, 8 Feb 2022 03:03:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346053AbiBHDDo (ORCPT ); Mon, 7 Feb 2022 22:03:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45268 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1346026AbiBHDDk (ORCPT ); Mon, 7 Feb 2022 22:03:40 -0500 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97EA4C0401D1 for ; Mon, 7 Feb 2022 19:03:36 -0800 (PST) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-) > > . >