Message ID | 20231220224504.646757-23-david@redhat.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-7546-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp55282dyi; Wed, 20 Dec 2023 14:50:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IHMbNn1c0O1DUqvlaLzgtiiEvb6IVDZoyKeGmrfFuDBilwkTFeM0GAgHmjBqEBeLXYZN2HU X-Received: by 2002:a05:620a:45a4:b0:781:d8f:1958 with SMTP id bp36-20020a05620a45a400b007810d8f1958mr3660156qkb.3.1703112615822; Wed, 20 Dec 2023 14:50:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703112615; cv=none; d=google.com; s=arc-20160816; b=he3pGJK8e18hysSH/K1tK2auxatU/EVFnFp8Vi8mC0Qa045mahx/tbqEg7F3MGrNWI CLlQ4kMgw6cOF9w4rBHA/6rhfUr29eFtj7Efq+o3LKiTbDFqY2xHB21+fQT3bTnPcCfU PFKemSfnZLGq928qmHnht9d1wLjtmxRLP0lRemm4pykskEIOZwZVTCLeakk/aQytrG6N l4P0mq8NFPaYgUJ4+esd/mwsBfwH4laJHrIG86aNe0DZ/CEgzAlc/ouF1nIi58LHtFFX ITv5j8ezymPwERjvl9A1tUKmqNVV4hvU9vmoisXS7/IZCCnHPim3ez3X5SsUunx1gY8+ //SA== ARC-Message-Signature: i=1; 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=H6kyFjjwWNovISb45JpAxGunVS8pf5Q0izk9V4kCoBM=; fh=UlFXU+hKOMcm6idRzNfe3Pu+B5L1f7aeir3C6i/NWQA=; b=cbAlUGOq04T7orpYQOzdLBnPy8BxOYX/QtpNp1ZuY5CtejJPNvBQoXyg+KWpAZf0Fi LKa6a8JKh+fUiD3n+Al91fSakgYL4U2drsCMWkDuFe79Grx1/r8sCEtEMYzGoLe5n+Ia VN4Ji2M8NbncVW0i+gpKyu4oPYV0SR0ly1edOIDxIeFO6Mf3Hs/aH1c1P03bMkbmMcQa 7wiq5ZXINt61zQT0bjxiVrNSmXTzwUxm/seO9E7fdcD8CccK2WmKP8VEVlW9P9zUlfmA QfAxGWsv4tKsoiHqJqqeFIFVIOycZjp/5Jcabdq1a0inHshJu+n6r1yNC7Zd5PCLo/DS RK1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GbvSK66n; spf=pass (google.com: domain of linux-kernel+bounces-7546-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7546-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id e12-20020a37ac0c000000b0077f0211c11csi729405qkm.588.2023.12.20.14.50.15 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Dec 2023 14:50:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-7546-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=GbvSK66n; spf=pass (google.com: domain of linux-kernel+bounces-7546-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-7546-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 99BB71C21CAA for <ouuuleilei@gmail.com>; Wed, 20 Dec 2023 22:50:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 43C6D4F5F3; Wed, 20 Dec 2023 22:46:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="GbvSK66n" X-Original-To: linux-kernel@vger.kernel.org Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.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 5A46C4F1F1 for <linux-kernel@vger.kernel.org>; Wed, 20 Dec 2023 22:46:11 +0000 (UTC) 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=1703112370; 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=H6kyFjjwWNovISb45JpAxGunVS8pf5Q0izk9V4kCoBM=; b=GbvSK66nnGGh5Zv5Z7ZsJydCD2pfM63MJybRGwWAwSk01Dk2stEZKljrZeRPZOIR/XoP5+ L23xTmFeUXEYZ6+Q0P6r35m++h7ijigGA+/7v1+8ZAzkgwVeRXQZmdlMYp1SdhRtIe3iKN gzitjg9/I6AH8BufQ/mH2PWdR7pUGog= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-564-BPRXZUsgNgykeRsAk0KDlQ-1; Wed, 20 Dec 2023 17:46:05 -0500 X-MC-Unique: BPRXZUsgNgykeRsAk0KDlQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 09319101A5DC; Wed, 20 Dec 2023 22:46:05 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.192.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id 90EFA40C6EB9; Wed, 20 Dec 2023 22:46:02 +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 (Oracle)" <willy@infradead.org>, Hugh Dickins <hughd@google.com>, Ryan Roberts <ryan.roberts@arm.com>, Yin Fengwei <fengwei.yin@intel.com>, Mike Kravetz <mike.kravetz@oracle.com>, Muchun Song <muchun.song@linux.dev>, Peter Xu <peterx@redhat.com> Subject: [PATCH v2 22/40] mm/rmap: remove RMAP_COMPOUND Date: Wed, 20 Dec 2023 23:44:46 +0100 Message-ID: <20231220224504.646757-23-david@redhat.com> In-Reply-To: <20231220224504.646757-1-david@redhat.com> References: <20231220224504.646757-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.2 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785843013996353579 X-GMAIL-MSGID: 1785843013996353579 |
Series |
mm/rmap: interface overhaul
|
|
Commit Message
David Hildenbrand
Dec. 20, 2023, 10:44 p.m. UTC
No longer used, let's remove it and clarify RMAP_NONE/RMAP_EXCLUSIVE a
bit.
Signed-off-by: David Hildenbrand <david@redhat.com>
---
include/linux/rmap.h | 12 +++---------
mm/rmap.c | 2 --
2 files changed, 3 insertions(+), 11 deletions(-)
diff --git a/include/linux/rmap.h b/include/linux/rmap.h index fe7b5a8b0e75b..bf6cb79aa7a0a 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -177,20 +177,14 @@ struct anon_vma *folio_get_anon_vma(struct folio *folio); typedef int __bitwise rmap_t; /* - * No special request: if the page is a subpage of a compound page, it is - * mapped via a PTE. The mapped (sub)page is possibly shared between processes. + * No special request: A mapped anonymous (sub)page is possibly shared between + * processes. */ #define RMAP_NONE ((__force rmap_t)0) -/* The (sub)page is exclusive to a single process. */ +/* The anonymous (sub)page is exclusive to a single process. */ #define RMAP_EXCLUSIVE ((__force rmap_t)BIT(0)) -/* - * The compound page is not mapped via PTEs, but instead via a single PMD and - * should be accounted accordingly. - */ -#define RMAP_COMPOUND ((__force rmap_t)BIT(1)) - /* * Internally, we're using an enum to specify the granularity. We make the * compiler emit specialized code for each granularity. diff --git a/mm/rmap.c b/mm/rmap.c index 87415bbf24022..2b386b9f6791c 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -2662,8 +2662,6 @@ void rmap_walk_locked(struct folio *folio, struct rmap_walk_control *rwc) * The following two functions are for anonymous (private mapped) hugepages. * Unlike common anonymous pages, anonymous hugepages have no accounting code * and no lru code, because we handle hugepages differently from common pages. - * - * RMAP_COMPOUND is ignored. */ void hugetlb_add_anon_rmap(struct folio *folio, struct vm_area_struct *vma, unsigned long address, rmap_t flags)