From patchwork Mon Dec 4 14:21:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13478525 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id A4954C4167B for ; Mon, 4 Dec 2023 14:22:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C10606B02A5; Mon, 4 Dec 2023 09:22:37 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id BC0446B02A7; Mon, 4 Dec 2023 09:22:37 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9C5086B02A9; Mon, 4 Dec 2023 09:22:37 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 897966B02A5 for ; Mon, 4 Dec 2023 09:22:37 -0500 (EST) Received: from smtpin30.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id 623C0120291 for ; Mon, 4 Dec 2023 14:22:37 +0000 (UTC) X-FDA: 81529351554.30.DF199AF Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf15.hostedemail.com (Postfix) with ESMTP id 9566EA000C for ; Mon, 4 Dec 2023 14:22:35 +0000 (UTC) Authentication-Results: imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=U3t4+JZw; spf=pass (imf15.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1701699755; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=yM8m6ebsRHp16rDmw00I1U0rPyCAW3pmLtjnA6MDqao=; b=S1eolryEjBflUtQDZIo0ZySkac4PsFUdFw2vM8UhvgJUu3tJnv97O6d2+49JbtzV65b5Za /98/QM9fzJN7p6aMKa/YtsubSKUjAkeTTJXii1SottxSK2ckfjgptiuKEcX7+isC5AbqY9 nzguTJ9KWMJlItIDNKRS3AGm8NqmS2c= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701699755; a=rsa-sha256; cv=none; b=zvjzcB7B+nfxx7LHZ9bv8gNIKUB0Qxs7yqeC5I7BpdO/Vfrn3sqvfy91nL6zlSGxwG4LP2 MF6DgKPkDJiCMy+Bbhd6jxdVGkJS2EuMjJzMsrVu0IwDnpwqQXjbjeRYEKcEaVHcylXrXp 2VG6EoRa9THC/m3M0DAKiPerltgbzco= ARC-Authentication-Results: i=1; imf15.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=U3t4+JZw; spf=pass (imf15.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1701699755; 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=U3t4+JZw4O4YBB4IEcn9PDva0xC2v4LPlTXYOq6w2X0r1dgrlBXue3N+jviGYALg6dc7pH NWfsq9XBrlrux3cNScmzGAuMhHC8NPumBJqLsoSj2zhzt/ccVu1a2YXaukOePJb3HYVlyx g0Ymcm7vh902mZVzkoE9X2ZfrsM5WK4= 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 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.4 X-Rspamd-Queue-Id: 9566EA000C X-Rspam-User: X-Stat-Signature: 6fd84qtyscbida4j88qykgyu4edrd51t X-Rspamd-Server: rspam03 X-HE-Tag: 1701699755-310712 X-HE-Meta: U2FsdGVkX187Av+A3er/49JSPrgb9dRENIHUcJqsVPV+OmvQbpoh72gcjGhi4pikX7GVK5Lh0rdzV+WvwkN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gFOxDzVJG64fRAPQSRuyCkrINlbEyj6WxBBiS3KCmRtO2wx/Yn50A== X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: 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)