Received: by 2002:a05:7412:b10a:b0:f3:1519:9f41 with SMTP id az10csp2739975rdb; Mon, 4 Dec 2023 06:24:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IEjXAN1vciAFa6dc9uTi0OAhuq3LP3o3HxnVCmgHyvsFw8BEm1ppZ9vjhRJZ8i+sV1fIpAj X-Received: by 2002:a17:903:2308:b0:1d0:6ffd:6e75 with SMTP id d8-20020a170903230800b001d06ffd6e75mr1991585plh.109.1701699841801; Mon, 04 Dec 2023 06:24:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701699841; cv=none; d=google.com; s=arc-20160816; b=wX48T0i1h1iyM+Ut6E6ziHGmcntnOoUmTFVvFKSm1/mW310T/iWSsVxbJnSbNuacpJ 7QkR7pks2g8Mp8kifQToyqyYlkmPMlZWakyCgF/WsaTevlz1nhW8C02cKPOuhQfo7WhR BjRq5ljtrqY6jOfNaO00RTZqmAu80jgcLvxIC7DVdStdxbjrKqca80fIJ3QN/RT5NmwP Id+LH+opylGCIaYN/sK/+IGqeTVITu7JtRzLm+X/BqumgRCWsZKt7EzemFVGRHDNAK9p j3CM5lTPKkrwNw3H5B6aDVRzLi6n2CwQVfWybDotAXkC/Mnvc1pGP2Ue94vyYuiR60w+ szaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=yM8m6ebsRHp16rDmw00I1U0rPyCAW3pmLtjnA6MDqao=; fh=UlFXU+hKOMcm6idRzNfe3Pu+B5L1f7aeir3C6i/NWQA=; b=nJ/NFvCNdUrQ0/yWcmI/k+6uSwHgK4j9uS6XAz1DMb5wzcioVoH+GPvFcGKEUX3irb 4AwIiNDAPKfKbCd00oYw2ivKsSU3Q+NCr/p9j5HQZi248BGrTd6PKWMy0j2DBrvLPZ5c y7OJLBLeGdZOBcJoJSJgcyY4ZIOo6unCsnlNCXw1cH4IPXc9Yua96pZZzYJmOcYXJHth V9SMZAzf+M23zUo90Ldyo5wjJyYN9ga8M68mSNihXeD2Gd9T89c1fhsaBVtAKH5wuxud gDHHFI32uqvuqwGJXnyXoAXU4SfPkSimev5pQsgZy6AoomDzTfgR4DuBduyRzLBgiqXx 07mA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OfxSlGad; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id ij8-20020a170902ab4800b001d065c68f06si4870717plb.494.2023.12.04.06.24.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 06:24:01 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=OfxSlGad; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 6DE0380A8B44; Mon, 4 Dec 2023 06:24:00 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235920AbjLDOXm (ORCPT + 99 others); Mon, 4 Dec 2023 09:23:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345318AbjLDOXC (ORCPT ); Mon, 4 Dec 2023 09:23:02 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C069D19BC for ; Mon, 4 Dec 2023 06:22:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701699754; 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=yM8m6ebsRHp16rDmw00I1U0rPyCAW3pmLtjnA6MDqao=; b=OfxSlGadlI4HtLxajMWXZbw3nuyK3JkFvFvj9sBje577HEXparIGrwYgrP7sOgC1e2e7xD 4/DVKx9aPOU7kSwRHIPOMyvikwYEp+ebr3SFAj3GoabwSFc93CMTZo3hbhCm+f2kPhk25q guLg1WsjjWzphOh+XA2U6jbXcnuw/Tc= 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-504-EoSRB73-NTeakXqzF60bBg-1; Mon, 04 Dec 2023 09:22:31 -0500 X-MC-Unique: EoSRB73-NTeakXqzF60bBg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (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 F2B7C101A550; Mon, 4 Dec 2023 14:22:29 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.195.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 599D82026D4C; Mon, 4 Dec 2023 14:22:28 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , "Matthew Wilcox (Oracle)" , Hugh Dickins , Ryan Roberts , Yin Fengwei , Mike Kravetz , Muchun Song , Peter Xu Subject: [PATCH RFC 22/39] mm/rmap: remove RMAP_COMPOUND Date: Mon, 4 Dec 2023 15:21:29 +0100 Message-ID: <20231204142146.91437-23-david@redhat.com> In-Reply-To: <20231204142146.91437-1-david@redhat.com> References: <20231204142146.91437-1-david@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 04 Dec 2023 06:24:00 -0800 (PST) No longer used, let's remove it and clarify RMAP_NONE/RMAP_EXCLUSIVE a bit. Signed-off-by: David Hildenbrand --- 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 865d83148852d..017b216915f19 100644 --- a/include/linux/rmap.h +++ b/include/linux/rmap.h @@ -172,20 +172,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. Usually, * we make the compiler create specialized variants for the different diff --git a/mm/rmap.c b/mm/rmap.c index 4cb9d8b7d1d65..3587225055c5e 100644 --- a/mm/rmap.c +++ b/mm/rmap.c @@ -2615,8 +2615,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) -- 2.41.0