Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp2730118pxb; Mon, 31 Jan 2022 03:06:03 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+bskt+jH84uAs14ECvCaM18HoZ89FL+IpQnBVrw7dM67Bt2pov4F+eMn/D/S+YpJL7oS0 X-Received: by 2002:a17:902:b68a:: with SMTP id c10mr16684964pls.44.1643627163640; Mon, 31 Jan 2022 03:06:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643627163; cv=none; d=google.com; s=arc-20160816; b=MWmGm9p4jDJX8jCMRX75tDWI8XZNOqDTsjJSnS3qGQr7hXddduqBN2LOqYuzLzVg7u cecEGM5nwKR122To06n8hZHmiwrdkXW6ALDOsuNTf8WnzZ+UMxrLsKbGSs8hGodwbWmQ X8mZ53SMUnrAyjxHVl1N8NyaIPlwgdcfsAESSAM9CH2TOIxRyEP9Ja79lVwkOhZe5ssp IfN2nWzTWyWctqil8b0wVd6jyjLQTRRTyEwAT0kE3N+kSCLJ6C/JYWUh+KXNmMctgApU 5MnwhF7jDOcvaxe6I/22a+wb5x2DRFma4Ej2Ux8I35r/0ViOvtG4rcn8lvR39s7QujzK Y1kA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=makDagrHRlU7vaXpIkbBqsJmR2imX/hQ0vT1IyZGbe8=; b=C+Xl3JzyJDPHB1PSpAJ/si6SGhDaEoFagLXa/5UWaxbANknKM0O83o3wb7WjJJuUyZ 6HPdRoLwBjX4X2sFSfLbYyoS17xqrOX9seM4O1MuVpDUjeGb20ypCWR0GS8FiE4SKj+J /QybvoutgPPe+m9lM6of2T96aZ8hjZuCN1ecaie3usndfGPZbIvWXb7RzCgc0Z/ENSLd kOF4GemnGb2H8QY1jkynOfCwexjhR3gPlpUxIeTokx8mdZDVskfMiZxeJ8JgZuNPdAnb gU8XEzwyvDOqiyCo2KV/GmboP5URqp3/5si//HZX9HxlY3NWREHhQwz3VRJYcyHtmfSf p07g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=hagW1D3v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j187si12661446pge.365.2022.01.31.03.05.53; Mon, 31 Jan 2022 03:06:03 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ziepe.ca header.s=google header.b=hagW1D3v; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349064AbiA1OVn (ORCPT + 99 others); Fri, 28 Jan 2022 09:21:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41162 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349046AbiA1OVm (ORCPT ); Fri, 28 Jan 2022 09:21:42 -0500 Received: from mail-qv1-xf31.google.com (mail-qv1-xf31.google.com [IPv6:2607:f8b0:4864:20::f31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42C4EC061714 for ; Fri, 28 Jan 2022 06:21:41 -0800 (PST) Received: by mail-qv1-xf31.google.com with SMTP id h16so5914773qvk.10 for ; Fri, 28 Jan 2022 06:21:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ziepe.ca; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=makDagrHRlU7vaXpIkbBqsJmR2imX/hQ0vT1IyZGbe8=; b=hagW1D3vrAXgmIdAaPuyb0ZYpBBI5GPj5cGf4t4VMPl2Hby0LDAfvZWMHlJD4RNPqz udQ6uMwMCSFght7z8OXaOlANPe89fBH+JadGzhs2iy3sYKIgrM8DNT9kykuob784vNJb /Y/FgIYpTCK+z7cKXzoYjO1GyqMmNfC0h5hNyGY73VQ5CoPXpXPP9nyVMuQ4vWD+VQga 0hYXfzvwCLnChzgjp4NqFihb4T9f8dI0raxoWaXnXY+5G5GDrUXCHtUcKwBORYZObA9Y YPaqcPq/4bzPj+zORYsBg7/S7b+i2mhRoE+TwNrxyzVcDs3wf6ttmJBlILKVUF4beVAI 0u4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=makDagrHRlU7vaXpIkbBqsJmR2imX/hQ0vT1IyZGbe8=; b=SMfURLX+aHBbPCKicMoDF2hJ1dRtrgG2ZEtiqRnMFL2KwkvyVDgqStFcscWlDCLz+k QpgksGgLauzQ2XpT4oxYUMFMOUV6GLKH/1PtUs4hqjIzyTkg6NcOLlP+mYPx37OGayqc lnNrIviW1zqQMLFPUlnJEIedulGn3vqXrNEil1EGuB7LwSo5R116aovM07DglupT0LKw 48pfFqjpeCP47yFs5NvyXZmlEA7L0fK8NmdhG7lIWnuEGCEARcVsyc304MlJ0UR7DSTe qhslYxST2mt2V2gMBaDWMRS+oIBAk6j9mqoZcj2tXAXsCSxMhkJczxbs8szBBvz/7MPg o85w== X-Gm-Message-State: AOAM531Gmn0ijNVCeqPytBleUYC+yS1DKukiZwWqDSFxtp4rsy/oCz90 BAMfongeW65WciffdPQ/4Dtnkw== X-Received: by 2002:a05:6214:519a:: with SMTP id kl26mr7027757qvb.68.1643379700472; Fri, 28 Jan 2022 06:21:40 -0800 (PST) Received: from ziepe.ca (hlfxns017vw-142-162-113-129.dhcp-dynamic.fibreop.ns.bellaliant.net. [142.162.113.129]) by smtp.gmail.com with ESMTPSA id o4sm3070925qtw.53.2022.01.28.06.21.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Jan 2022 06:21:39 -0800 (PST) Received: from jgg by mlx with local (Exim 4.94) (envelope-from ) id 1nDS8A-007UXM-Bu; Fri, 28 Jan 2022 10:21:38 -0400 Date: Fri, 28 Jan 2022 10:21:38 -0400 From: Jason Gunthorpe To: Logan Gunthorpe Cc: linux-kernel@vger.kernel.org, linux-nvme@lists.infradead.org, linux-block@vger.kernel.org, linux-pci@vger.kernel.org, linux-mm@kvack.org, iommu@lists.linux-foundation.org, Stephen Bates , Christoph Hellwig , Dan Williams , Christian =?utf-8?B?S8O2bmln?= , John Hubbard , Don Dutile , Matthew Wilcox , Daniel Vetter , Jakowski Andrzej , Minturn Dave B , Jason Ekstrand , Dave Hansen , Xiong Jianxin , Bjorn Helgaas , Ira Weiny , Robin Murphy , Martin Oliveira , Chaitanya Kulkarni , Ralph Campbell , Alex Sierra Subject: Re: [PATCH v5 02/24] mm: remove extra ZONE_DEVICE struct page refcount Message-ID: <20220128142138.GU8034@ziepe.ca> References: <20220128002614.6136-1-logang@deltatee.com> <20220128002614.6136-3-logang@deltatee.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220128002614.6136-3-logang@deltatee.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jan 27, 2022 at 05:25:52PM -0700, Logan Gunthorpe wrote: > From: Ralph Campbell > > ZONE_DEVICE struct pages have an extra reference count that complicates the > code for put_page() and several places in the kernel that need to check the > reference count to see that a page is not being used (gup, compaction, > migration, etc.). Clean up the code so the reference count doesn't need to > be treated specially for ZONE_DEVICE. > > [logang: dropped no longer used section from mm.h including > page_is_devmap_managed, rebased on v5.17-rc1 (possibly poorly)] > Signed-off-by: Ralph Campbell > Signed-off-by: Alex Sierra > Signed-off-by: Logan Gunthorpe > Reviewed-by: Christoph Hellwig > --- > arch/powerpc/kvm/book3s_hv_uvmem.c | 2 +- > drivers/gpu/drm/nouveau/nouveau_dmem.c | 2 +- > fs/dax.c | 4 +- > include/linux/dax.h | 2 +- > include/linux/memremap.h | 7 +-- > include/linux/mm.h | 44 ---------------- > lib/test_hmm.c | 2 +- > mm/internal.h | 8 +++ > mm/memcontrol.c | 6 +-- > mm/memremap.c | 70 +++++++------------------- > mm/migrate.c | 5 -- > mm/page_alloc.c | 3 ++ > mm/swap.c | 45 ++--------------- > 13 files changed, 46 insertions(+), 154 deletions(-) This patch still can't be applied until the FSDAX issues are solved, right? See my remarks the last time it was posted.. Jason