Message ID | 20240226141324.278526-3-david@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-81595-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2105394dyb; Mon, 26 Feb 2024 06:17:59 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVaNDINNuIpa/HAODQMbh7D2qU4YuFNf91OhlU/k8oIq0z9Ef7+/o97qCu/rmhEDnTL8S9WzTA64oldnW1dxyUBm0aUpQ== X-Google-Smtp-Source: AGHT+IEKLZf4ma2u3ERxXG3xh2hcDnbXCpF8MC9Rl81RYU+C2EBZ0x3bCPHNydF/R/p00Le4jFga X-Received: by 2002:a17:902:db01:b0:1dc:6373:3cc with SMTP id m1-20020a170902db0100b001dc637303ccmr7274256plx.50.1708957079774; Mon, 26 Feb 2024 06:17:59 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708957079; cv=pass; d=google.com; s=arc-20160816; b=Z110Vljtby2YQuUYtPJmTUgtw5vlqZiPEEC65pTRE/jdZxMLuc/eMYoKxZ3gKrZ/75 Db1nXUiR/8onTuaOO7t1Htmca5AQW+WTiNCrBilj8SfdNpHZGTavFtIjUcEd6Uyze6qW qtkSWkFks6mZQkpBaHX6N1JGv5DIwkySSzUe2JxafbK4CsBI085RXsHwDHWSRWVn9Eig nA2F3czCOZxQBkcnJnlt7kgrzzXpaI04bbBmoWh3+eBdxH06OPoPJ3BmmpchTvUVuyRV NxL/Xct3pMQb4gVX5Zpq2Q6cfkUSECh2CQFRcpVnG+wF6J6FgLGXFMgNjT0xk+VHp1wk w9+w== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81595-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id l18-20020a170902d35200b001db7c5ef0a6si3727098plk.136.2024.02.26.06.17.59 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 06:17:59 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81595-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81595-ouuuleilei=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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 4A77F292349 for <ouuuleilei@gmail.com>; Mon, 26 Feb 2024 14:14:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C966912B151; Mon, 26 Feb 2024 14:13:43 +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 <linux-kernel@vger.kernel.org>; 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 <david@redhat.com> To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand <david@redhat.com>, Andrew Morton <akpm@linux-foundation.org>, Matthew Wilcox <willy@infradead.org> 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: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.7 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791971379038971718 X-GMAIL-MSGID: 1791971379038971718 |
Series |
mm: remove total_mapcount()
|
|
Commit Message
David Hildenbrand
Feb. 26, 2024, 2:13 p.m. UTC
All users of total_mapcount() are gone, let's remove it.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
include/linux/mm.h | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
Comments
On Mon, Feb 26, 2024 at 03:13:24PM +0100, David Hildenbrand wrote: > All users of total_mapcount() are gone, let's remove it. > > Signed-off-by: David Hildenbrand <david@redhat.com> Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
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) { /*