From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3B8DA146A69 for ; Fri, 5 Jul 2024 14:24:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720189462; cv=none; b=fTMOxEqPPh+2RZO7Kcw/Du48KpRaLDS/xvfmFy9VIxMv2eS3a2t6LLWZI95K95vH0PUDxN1pwgYOcu1HsQOPvcf44MHS+yA+aKAS7JMTTLwTHFHq6VAyJ/lW1RUUIuDlEw3frl1GsPGveIAmtkuDV8+S+R2SYrwbHbC2tbshdR8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1720189462; c=relaxed/simple; bh=ezE9cMK85xGULq2NDfyultVM78ZkLbyifJxcFeIVVd4=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=uvEQ6wXW4m4gk2khF6Oz3O7fvcxtkQJCNpMIE/v+jTiTt3EqMFzqVwHrD3gx1hXaKlRciOqgsp+V+KZcyruM+R8FnNpCWvHkS6GQpxs2CHx0j4ha4tdMHf5dI5HDtgRRoqS+JyONNyUPjNc6/Y5p4ioD+Ihcho/V5d9ZcVZ5w2M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=GomyGT6q; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GomyGT6q" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1720189460; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=IqBTg61cVL77faXIzfdAxULAIPGMk1ZHXjVPHmfrZtE=; b=GomyGT6q4Dkoew0pCRUYAoml9aFCdZYOXIEQEjz64CtThBXoFF7Mra3soyxFZs7BYZGnr4 vzGyfb+mUwBbgyhfR+bveNOh3TOMIFBnkRrYodstWMD/mhDtfkrnQteBVO2+kFcUWqNqxi S8ghGxK+13S2T1g7QDuve6Z+12fHe3M= Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-619-a7beA0UcOcqLIT10d1RX4A-1; Fri, 05 Jul 2024 10:24:18 -0400 X-MC-Unique: a7beA0UcOcqLIT10d1RX4A-1 Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-44508288ad0so2542061cf.2 for ; Fri, 05 Jul 2024 07:24:18 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720189458; x=1720794258; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=IqBTg61cVL77faXIzfdAxULAIPGMk1ZHXjVPHmfrZtE=; b=Arh++uY1RQlWxtqsavem/xbXDuNwDFSgYU90WWQn0EHmaVodij5+D8Tin+B6yVSXRJ BPVdfV+SDegCNwhZB5Lx8kkeklIeGD5Ge/mbB4z2a+YdfLuLNHfH+fMZDuRMf6wNpkhK 1gqxU/Yy6GyIiC2a05Bx3sBKyBdz+JgSgIG7gghtuEpvHAapLhf34pgAaP2Ac6mIg/Az gleZHfmDMiAX2psENpBub08EtuWpGEJMWfw4tWQPqwnTdYA5iQitrUfz2+9ouRsIniuT Qi6H7NITTBybYJBArXgKURR6zTAzM1GHb4axmlsi2zZlNgXxmVsZodelvNT5pCiF+AX5 pdDQ== X-Forwarded-Encrypted: i=1; AJvYcCW8fqC0MexegQPVMmbWMYFCQ13OeGqxbE+e2+Vtb5vzVrvL2nGC3QMr90abMX7WVjP/cEAhU+cfwZuxjh1mlgeFWSs0Bh543m/L X-Gm-Message-State: AOJu0YxL9CFpxN0NoI9oF/fpKu4QTcgaz2PAX7bmWdVFTZASL5IzlBYw LNmGf1H5hrXN57XiW4lzZiH1MA+PRmPnzGZI1POSsajb6Tl+4gG8dmJjOe1pXL8H0YmdQijHc+N ovYPj3qRIT0t0Z4t9YyfNFpvqMaRliSz47OQrnpqf8mmdsI6tu9sLLnxqHA== X-Received: by 2002:ac8:7c4b:0:b0:446:395a:37c9 with SMTP id d75a77b69052e-447cc1cd760mr50256971cf.4.1720189458373; Fri, 05 Jul 2024 07:24:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGKP4/uPX8iCeoUcNLMV3z8vBAByHvLymsXhgYIxVOYKgo8tVByPTMSYbiLBJ2KPlAF3hMSkQ== X-Received: by 2002:ac8:7c4b:0:b0:446:395a:37c9 with SMTP id d75a77b69052e-447cc1cd760mr50256521cf.4.1720189457935; Fri, 05 Jul 2024 07:24:17 -0700 (PDT) Received: from x1n (pool-99-254-121-117.cpe.net.cable.rogers.com. [99.254.121.117]) by smtp.gmail.com with ESMTPSA id d75a77b69052e-4465149b579sm69523231cf.75.2024.07.05.07.24.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jul 2024 07:24:17 -0700 (PDT) Date: Fri, 5 Jul 2024 10:24:14 -0400 From: Peter Xu To: Alistair Popple Cc: dan.j.williams@intel.com, vishal.l.verma@intel.com, dave.jiang@intel.com, logang@deltatee.com, bhelgaas@google.com, jack@suse.cz, jgg@ziepe.ca, catalin.marinas@arm.com, will@kernel.org, mpe@ellerman.id.au, npiggin@gmail.com, dave.hansen@linux.intel.com, ira.weiny@intel.com, willy@infradead.org, djwong@kernel.org, tytso@mit.edu, linmiaohe@huawei.com, david@redhat.com, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linuxppc-dev@lists.ozlabs.org, nvdimm@lists.linux.dev, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-ext4@vger.kernel.org, linux-xfs@vger.kernel.org, jhubbard@nvidia.com, hch@lst.de, david@fromorbit.com, Alex Williamson Subject: Re: [PATCH 11/13] huge_memory: Remove dead vmf_insert_pXd code Message-ID: References: <400a4584f6f628998a7093aee49d9f86c592754b.1719386613.git-series.apopple@nvidia.com> Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <400a4584f6f628998a7093aee49d9f86c592754b.1719386613.git-series.apopple@nvidia.com> Hi, Alistair, On Thu, Jun 27, 2024 at 10:54:26AM +1000, Alistair Popple wrote: > Now that DAX is managing page reference counts the same as normal > pages there are no callers for vmf_insert_pXd functions so remove > them. > > Signed-off-by: Alistair Popple > --- > include/linux/huge_mm.h | 2 +- > mm/huge_memory.c | 165 +----------------------------------------- > 2 files changed, 167 deletions(-) > > diff --git a/include/linux/huge_mm.h b/include/linux/huge_mm.h > index 9207d8e..0fb6bff 100644 > --- a/include/linux/huge_mm.h > +++ b/include/linux/huge_mm.h > @@ -37,8 +37,6 @@ int change_huge_pmd(struct mmu_gather *tlb, struct vm_area_struct *vma, > pmd_t *pmd, unsigned long addr, pgprot_t newprot, > unsigned long cp_flags); > > -vm_fault_t vmf_insert_pfn_pmd(struct vm_fault *vmf, pfn_t pfn, bool write); > -vm_fault_t vmf_insert_pfn_pud(struct vm_fault *vmf, pfn_t pfn, bool write); > vm_fault_t dax_insert_pfn_pmd(struct vm_fault *vmf, pfn_t pfn, bool write); > vm_fault_t dax_insert_pfn_pud(struct vm_fault *vmf, pfn_t pfn, bool write); There's a plan to support huge pfnmaps in VFIO, which may still make good use of these functions. I think it's fine to remove them but it may mean we'll need to add them back when supporting pfnmaps with no memmap. Is it still possible to make the old API generic to both service the new dax refcount plan, but at the meantime working for pfn injections when there's no page struct? Thanks, -- Peter Xu