Received: by 2002:a05:7412:8d06:b0:f9:332d:97f1 with SMTP id bj6csp24728rdb; Mon, 18 Dec 2023 08:01:22 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqC0GzBVW0YuigI0uFiWjtyQtvMYd2X5H08mOYp8sB6n8nTborK+/04L0Z6qOhe8LgbzCe X-Received: by 2002:ac8:5c01:0:b0:425:9382:6531 with SMTP id i1-20020ac85c01000000b0042593826531mr22057306qti.43.1702915282026; Mon, 18 Dec 2023 08:01:22 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702915282; cv=none; d=google.com; s=arc-20160816; b=wxywwYGJxEVSenTTPdZOZWTsM2GtPmht5VepJRB5e7+c63Xedwu2bGPPJ3ppTyGgR+ UB/ERVIY6fLzDllg8vss7ksra8/VbAal+hugOQBUydgGHlgSiz4b5UfkzsV91McB5iWF YD4KIAnwv7A9ElvMPsYnIDGttTMGmOIaV4aF1dCPDExLpG//XrOzkUwrDy8h+Rew223N fUyYKwK5Vunlj8HtBc4GOJ3RFeVLf6JcnZShbTYE1UzC03/NHOKdrz/BA28EW7L5pAPu DnKEm08YRrs3yUNqDIqTfdgClHei8V7rr2a78O73BWo4EyEGpT7JQawRFu/7NxuvfHio 2zQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=8MGN0x42vFjjXCcwymndj5TOxAguN9oaK8beOHhPh5o=; fh=GlLzLBhqF07GE0FJUf82nnkBDPyXS9iIZ0BDzvPX32s=; b=ROIKkbM957v0JI5fj/ALxFfx7dwWADV0RCCNQSDyI8BUdMg9936ZuOFgak+J+WLjn8 7H/bvqQz8TrAppLugUpW6O5i4SpVlr6MD1gqU9utGc/9acz1cjdIUMBMxEx5XHNjQl8z dTxxDR1SudQSS4D2hMtRHaDPNV+kSAx8ZVziIKiUrLn/ME7QOSnDVuuzYRqB7e/5zPoQ VQDddpp+RiOvwvnX3r/5VM/9od/2PyBWE/jCxJek/66X2NGYbmlxD/NShb2JCuvbM02/ Ej4h1azmyggpST2swnxy137YQUAY4P+uq9Oi8VyzEkR6wRsmyli3NCjTjmYfPUJhhRFZ hAbQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o14-20020ac8698e000000b004239a074a63si22922924qtq.620.2023.12.18.08.01.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Dec 2023 08:01:22 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-4008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel+bounces-4008-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-4008-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id B5F9C1C255A2 for ; Mon, 18 Dec 2023 16:01:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDA9E42390; Mon, 18 Dec 2023 16:00:37 +0000 (UTC) X-Original-To: linux-kernel@vger.kernel.org Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2E4394237C for ; Mon, 18 Dec 2023 16:00:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id F2EB42F4; Mon, 18 Dec 2023 08:01:18 -0800 (PST) Received: from [10.57.75.230] (unknown [10.57.75.230]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id E05403F5A1; Mon, 18 Dec 2023 08:00:32 -0800 (PST) Message-ID: <5cae7442-360e-449e-a1a4-50c33b02b9ed@arm.com> Date: Mon, 18 Dec 2023 16:00:32 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 12/39] mm/rmap: remove page_add_file_rmap() Content-Language: en-GB To: David Hildenbrand , linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, Andrew Morton , "Matthew Wilcox (Oracle)" , Hugh Dickins , Yin Fengwei , Mike Kravetz , Muchun Song , Peter Xu References: <20231211155652.131054-1-david@redhat.com> <20231211155652.131054-13-david@redhat.com> From: Ryan Roberts In-Reply-To: <20231211155652.131054-13-david@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 11/12/2023 15:56, David Hildenbrand wrote: > All users are gone, let's remove it. > > Reviewed-by: Yin Fengwei > Signed-off-by: David Hildenbrand Reviewed-by: Ryan Roberts > --- > include/linux/rmap.h | 2 -- > mm/rmap.c | 21 --------------------- > 2 files changed, 23 deletions(-) > > diff --git a/include/linux/rmap.h b/include/linux/rmap.h > index 1753900f4aed..7198905dc8be 100644 > --- a/include/linux/rmap.h > +++ b/include/linux/rmap.h > @@ -240,8 +240,6 @@ void page_add_new_anon_rmap(struct page *, struct vm_area_struct *, > unsigned long address); > void folio_add_new_anon_rmap(struct folio *, struct vm_area_struct *, > unsigned long address); > -void page_add_file_rmap(struct page *, struct vm_area_struct *, > - bool compound); > void folio_add_file_rmap_ptes(struct folio *, struct page *, int nr_pages, > struct vm_area_struct *); > #define folio_add_file_rmap_pte(folio, page, vma) \ > diff --git a/mm/rmap.c b/mm/rmap.c > index 4f30930a1162..2ff2f11275e5 100644 > --- a/mm/rmap.c > +++ b/mm/rmap.c > @@ -1467,27 +1467,6 @@ void folio_add_file_rmap_pmd(struct folio *folio, struct page *page, > #endif > } > > -/** > - * page_add_file_rmap - add pte mapping to a file page > - * @page: the page to add the mapping to > - * @vma: the vm area in which the mapping is added > - * @compound: charge the page as compound or small page > - * > - * The caller needs to hold the pte lock. > - */ > -void page_add_file_rmap(struct page *page, struct vm_area_struct *vma, > - bool compound) > -{ > - struct folio *folio = page_folio(page); > - > - VM_WARN_ON_ONCE_PAGE(compound && !PageTransHuge(page), page); > - > - if (likely(!compound)) > - folio_add_file_rmap_pte(folio, page, vma); > - else > - folio_add_file_rmap_pmd(folio, page, vma); > -} > - > /** > * page_remove_rmap - take down pte mapping from a page > * @page: page to remove mapping from