Received: by 2002:a05:7208:9594:b0:7e:5202:c8b4 with SMTP id gs20csp1336769rbb; Mon, 26 Feb 2024 06:22:36 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVNHJcX8nKyhX+PrFKi57ArqwuPj/orGgSUoWTXpH2aEpzfiWr5GR+2HBRz/ikFSn22LSXxEctc7K0h/9+phF0fh+Bt0+KxDHAfGjdKxg== X-Google-Smtp-Source: AGHT+IHBgwB1espXX9UAj4nUjQ3hTEr8EsbFCDHUmYtfFL/rOahHzVrKOlVB+V7KBTdb8dhyM5Nh X-Received: by 2002:a05:6512:b1b:b0:513:7:fc3c with SMTP id w27-20020a0565120b1b00b005130007fc3cmr1381466lfu.55.1708957356742; Mon, 26 Feb 2024 06:22:36 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708957356; cv=pass; d=google.com; s=arc-20160816; b=VuFhPJXl9/6QhDM76Tc2iyLCkXntrqLFPn3RNhQaJQ0YLBe5wy5yyXZr8Lud5aNszz AKTzHEZrI/uCe44gwQBzyU5gDBGvThEDlqWhVlCHd8tulfUSehmVFfaudebe+vukx8bV b1nRZLZFPIl7UxABKoStJOeYqAAhXXVULyrUKwwxTCUDgzlyMVA7HZNViS4yMHfBoJZ7 VtY7dTwCMVQJ7ZcRrR8uQ5gpVTQHdiK6+s5A3EuDcOR4XE6uJTvAwwznxOz5weH08LJ+ cGh1+NU0qvSB7WUeb2fgTF9owrLk92BNP1lefy+ERmNdu8cLEJsAYNOhU2xZ4EGFUAUD uE9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=fzz4oIdsJNeqF+PoyUnhajnBU3sMK99bnWW/MxMH7Ys=; fh=wm/PuDf5kO+3RFpgEWpn6tkOmws9Iy+MHxtReSjFHG4=; b=cySw8K3mdlB2dl2mjfJcYeWr8NP9cc0y4DmYad4/wSNptMdhp3T31shYd55YR68GwZ Ar3E9Fjmw7g0UkXmrFnQHn69Ka10qaCbDCYhqPqsriwXD8JcqufXX7Kr4spV6NqhMk7B lwsxaR77p4778mXzCk5DR6P3d9IDEINKgwmYVPXsoc6Ozp82dgusGBhk9z0+JQriE4kZ SqPVAMnJLbtNw9/Ri4LEu+EkuOR5BsaY3AU70HU4AQ5nlwVnszWc0VTj2CkZIREyYHCt NrwlsSvmjziYeAL4oi/cyRnuyuhXzaQ5L8dk8GycPDFGq2aXdEuWxDBO5G76w1KmgHJo VX6Q==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UOgXB6WA; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-81595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r21-20020a170906365500b00a42f385aed9si2032016ejb.561.2024.02.26.06.22.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 06:22:36 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UOgXB6WA; arc=pass (i=1 spf=pass spfdomain=redhat.com dkim=pass dkdomain=redhat.com dmarc=pass fromdomain=redhat.com); spf=pass (google.com: domain of linux-kernel+bounces-81595-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81595-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.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 am.mirrors.kernel.org (Postfix) with ESMTPS id 176E41F2CA40 for ; Mon, 26 Feb 2024 14:14:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 00B33129A96; Mon, 26 Feb 2024 14:13:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="UOgXB6WA" 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 CB45E12AADD for ; Mon, 26 Feb 2024 14:13:38 +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=1708956821; cv=none; b=Z+dRmyULmdvqx0pktkhhUweIN06Jo7MsO6gTQDWkgjlo8n3jsMI6XHgXNL2ZY9/gV2PZ85ouJKnqeZiZKUiztbA4/XKsXT7CS1PPanpGw65YCQIIwQur0rXKZAfD5BHHC/OH98DV84eXO6bj0Gaekxz/ZfyMroS1TMDoJt2qZt4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708956821; c=relaxed/simple; bh=GWrvOCNTQBiOgQYlCK+1fhIT/QiAP3OOhXVDcNrF+mM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Zlf23dnJH/pN934tCdFjZSX3aBJ70aaHw3gZcZ3tjt8EQXeuQ1htTAM4lODo7RVuM8ODWiO5dNbGE+S3gO80h/TzT+/Dgk5idPZATpmF88DU/KRGU/m/ek7EX2yR4epexHfyJCdiAMN5iyrUSyua9lf7seNpOHYjrxarDtD/oYs= 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=UOgXB6WA; 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1708956817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=fzz4oIdsJNeqF+PoyUnhajnBU3sMK99bnWW/MxMH7Ys=; b=UOgXB6WAZ5Ub1kroDzD+Ic5+8MtBQ6RF6asrspqHxU3NqGsJRFaPScxdL/0W0+qseU5EEO DhvjJjC8myyzfmMhVqjt3IFIjZzsJVzVdZP13CTo1YqnaGLt2Pp0N0nj+8ml12dvr6KTyP t31s+S+IQHI8MneXsXWLShmsL7BBHMs= Received: from mimecast-mx02.redhat.com (mx-ext.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-531-a1B9APTNPEOyuSsYVlQSgg-1; Mon, 26 Feb 2024 09:13:32 -0500 X-MC-Unique: a1B9APTNPEOyuSsYVlQSgg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 864803C28642; Mon, 26 Feb 2024 14:13:32 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.192.224]) by smtp.corp.redhat.com (Postfix) with ESMTP id EEC821C06710; Mon, 26 Feb 2024 14:13:29 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , Matthew Wilcox Subject: [PATCH v2 2/2] mm: remove total_mapcount() Date: Mon, 26 Feb 2024 15:13:24 +0100 Message-ID: <20240226141324.278526-3-david@redhat.com> In-Reply-To: <20240226141324.278526-1-david@redhat.com> References: <20240226141324.278526-1-david@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 All users of total_mapcount() are gone, let's remove it. Signed-off-by: David Hildenbrand --- include/linux/mm.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/include/linux/mm.h b/include/linux/mm.h index 6f4825d829656..49e22a2f6cccc 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h @@ -1183,7 +1183,7 @@ static inline int is_vmalloc_or_module_addr(const void *x) * How many times the entire folio is mapped as a single unit (eg by a * PMD or PUD entry). This is probably not what you want, except for * debugging purposes - it does not include PTE-mapped sub-pages; look - * at folio_mapcount() or page_mapcount() or total_mapcount() instead. + * at folio_mapcount() or page_mapcount() instead. */ static inline int folio_entire_mapcount(struct folio *folio) { @@ -1243,13 +1243,6 @@ static inline int folio_mapcount(struct folio *folio) return folio_total_mapcount(folio); } -static inline int total_mapcount(struct page *page) -{ - if (likely(!PageCompound(page))) - return atomic_read(&page->_mapcount) + 1; - return folio_total_mapcount(page_folio(page)); -} - static inline bool folio_large_is_mapped(struct folio *folio) { /* -- 2.43.2