From patchwork Mon Dec 4 14:21:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13478519 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 16688C10DCE for ; Mon, 4 Dec 2023 14:22:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 1B8696B0202; Mon, 4 Dec 2023 09:22:26 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 146F86B0213; Mon, 4 Dec 2023 09:22:26 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id ECE466B0202; Mon, 4 Dec 2023 09:22:25 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id D90E96B01F2 for ; Mon, 4 Dec 2023 09:22:25 -0500 (EST) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id B501816027A for ; Mon, 4 Dec 2023 14:22:25 +0000 (UTC) X-FDA: 81529351050.10.09F92E7 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf26.hostedemail.com (Postfix) with ESMTP id B270514001C for ; Mon, 4 Dec 2023 14:22:23 +0000 (UTC) Authentication-Results: imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=h8LZ2Pko; spf=pass (imf26.hostedemail.com: domain of david@redhat.com designates 170.10.129.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=1701699743; 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=SP+gQ2Yl7ptxMmm0EN/M4/z6MAPTYZkvBQ5MoVKoj/U=; b=gSAfl31cCXZJ4vvD0QnCCkb5kzqUEHkVoLVWUm59u+FOATdc/vLYu0gaYeb9Ed69vhnCPD 0ZQHJfLlmCVTiHblR2dGXHmCLY7m18adlaXV7gBwopPPpyM0xezLw19+5Ov9rH8I0FjWRU gcLz+esufoAt9tYgOnyZy2wtKNOY8aw= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1701699743; a=rsa-sha256; cv=none; b=s4CFhC4p14AoCY36VHoO2yFMhA+B17Hi71BpSeFC5xSEbYs3qUvle56UYA/BbF+E5+pOii LnDugf+BixNfQ1J1DBuVLTbHwnEiD8cGUQ2MoIelNZ9d1C8CBMpBG4ADs3bIWuMgeFloh0 qE3E7kHDNNqSO4uzdG5IrBoHbyad7pg= ARC-Authentication-Results: i=1; imf26.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=h8LZ2Pko; spf=pass (imf26.hostedemail.com: domain of david@redhat.com designates 170.10.129.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=1701699743; 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=SP+gQ2Yl7ptxMmm0EN/M4/z6MAPTYZkvBQ5MoVKoj/U=; b=h8LZ2PkoCvkRXgD0f+QYlpD0jMN9DZokLJplP1fBdgbwaHzAo2zXUYM1lZsUaXHDDbwEQI 7zy836OULal4K1TqQDPocKjEI/P1cc8zfPJpWnJFGPEsTozs2THpsDo32iUaJYq1ESbRRo sCXwv62Jrj0x6JkUH1gcH9iDPMW/+Ks= 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-629-LlQ3-zByOwSqnbEF8yG6og-1; Mon, 04 Dec 2023 09:22:19 -0500 X-MC-Unique: LlQ3-zByOwSqnbEF8yG6og-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 C80C18314FA; Mon, 4 Dec 2023 14:22:18 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.195.87]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3338B2026D4C; Mon, 4 Dec 2023 14:22:17 +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 16/39] mm/huge_memory: page_add_anon_rmap() -> folio_add_anon_rmap_pmd() Date: Mon, 4 Dec 2023 15:21:23 +0100 Message-ID: <20231204142146.91437-17-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-Stat-Signature: emhdwbqu63iayzmtkjzbeob94zjp4551 X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: B270514001C X-Rspam-User: X-HE-Tag: 1701699743-870615 X-HE-Meta: U2FsdGVkX1+Eq+CF51G9/V2jIQV++u6w+XLgDj5oR1457d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+fdkPoByK3HWbAoetQFH1H4u8TZotqReW1Bx/ScTooINXIBJzqQSjekZ78OqNnYrfFLrZzlm31dnWH//1dhgw== 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: Let's convert remove_migration_pmd(). No need to set RMAP_COMPOUND, that we will remove soon. Signed-off-by: David Hildenbrand --- mm/huge_memory.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 2c037ab3f4916..332cb6cf99f38 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -3310,12 +3310,12 @@ void remove_migration_pmd(struct page_vma_mapped_walk *pvmw, struct page *new) pmde = pmd_mkdirty(pmde); if (folio_test_anon(folio)) { - rmap_t rmap_flags = RMAP_COMPOUND; + rmap_t rmap_flags = RMAP_NONE; if (!is_readable_migration_entry(entry)) rmap_flags |= RMAP_EXCLUSIVE; - page_add_anon_rmap(new, vma, haddr, rmap_flags); + folio_add_anon_rmap_pmd(folio, new, vma, haddr, rmap_flags); } else { folio_add_file_rmap_pmd(folio, new, vma); }