From nobody Sun Oct 5 14:34:02 2025 Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172]) (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 A4588257AC1; Mon, 4 Aug 2025 12:14:25 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.241.56.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754309667; cv=none; b=Nj1uh6flbBU4YgJaQJqG06/uJGHo+XdHLDzrCi2+1ucUgDDu9JakgXEvVlT5leYQr8brXTIEdE4ZgUoHxloAl2+WNTD3fyftqwXIg6Kbww9Frc2takHd+275M+olZdETtEVByf8U7TG3OZUMpr844R8l/dwgFs+QdOBF9H6oaCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1754309667; c=relaxed/simple; bh=UKAD9G0m+k7yLbfJfggBlGndpjwV/RD9cXO+ZpPCKQE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=B3Q1R0swXxnCA/s1P3z/2tiaCi6QYLcI94LGFX7XA+9I14ong/C49qoWaTTS/gtzvGIHCPkubxynfA6+pJE3AiM3FODbjtGBthrPrUX2RBP0H0JOiH9l3na9uBlOun8rh/lVFJtYD3P++DIpq55EJKlSoo8uhg5e89gagedZoXs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com; spf=pass smtp.mailfrom=pankajraghav.com; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b=hqpyJBmN; arc=none smtp.client-ip=80.241.56.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pankajraghav.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pankajraghav.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pankajraghav.com header.i=@pankajraghav.com header.b="hqpyJBmN" Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4bwb8F6Hrsz9t1l; Mon, 4 Aug 2025 14:14:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pankajraghav.com; s=MBO0001; t=1754309661; 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=X5VaNFZHQ+UIZ3WR6R9OAhvW0u/boKe4vv5xZzerPYI=; b=hqpyJBmN5S+9+tFYA5ZZm0p8MUaJIBmETy/KUwmZ87TCwxxfGTJEGKZwZnpigomTBopqAr kGrWMPK7osRRCFCZE7FC1x+cmC2MGBpPHt2lT1Kpaiq24X1PRkvxKR+ya9aQVI6Pw1eGcA MU2FYXdz1BJf1I8Er/H00byiePvy/1G996TwXZubjOcc85Iqo3U4mYQhMIOx8vPOYxz7F4 eRXVRNCWaB7V7yaxi0DGd5pH9tZsRcvNhlirWHp/8sGhRnAGPzrM2C7ca4p9ftpzFAevua hPzZXE0zPMNNMDCCZ6RRKE7apaJOQJRVY9Q4igA87V3Z046Aau8NZK2WdVcNJg== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of kernel@pankajraghav.com designates 2001:67c:2050:b231:465::202 as permitted sender) smtp.mailfrom=kernel@pankajraghav.com From: "Pankaj Raghav (Samsung)" To: Suren Baghdasaryan , Ryan Roberts , Baolin Wang , Borislav Petkov , Ingo Molnar , "H . Peter Anvin" , Vlastimil Babka , Zi Yan , Mike Rapoport , Dave Hansen , Michal Hocko , David Hildenbrand , Lorenzo Stoakes , Andrew Morton , Thomas Gleixner , Nico Pache , Dev Jain , "Liam R . Howlett" , Jens Axboe Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org, willy@infradead.org, x86@kernel.org, linux-block@vger.kernel.org, Ritesh Harjani , linux-fsdevel@vger.kernel.org, "Darrick J . Wong" , mcgrof@kernel.org, gost.dev@samsung.com, kernel@pankajraghav.com, hch@lst.de, Pankaj Raghav Subject: [PATCH 2/5] mm: rename MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO Date: Mon, 4 Aug 2025 14:13:53 +0200 Message-ID: <20250804121356.572917-3-kernel@pankajraghav.com> In-Reply-To: <20250804121356.572917-1-kernel@pankajraghav.com> References: <20250804121356.572917-1-kernel@pankajraghav.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4bwb8F6Hrsz9t1l Content-Type: text/plain; charset="utf-8" From: Pankaj Raghav As all the helper functions has been renamed from *_page to *_folio, rename the MM flag from MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO. No functional changes. Suggested-by: David Hildenbrand Signed-off-by: Pankaj Raghav --- include/linux/mm_types.h | 2 +- mm/huge_memory.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h index 1ec273b06691..2ad5eaddfcce 100644 --- a/include/linux/mm_types.h +++ b/include/linux/mm_types.h @@ -1753,7 +1753,7 @@ enum { #define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */ #define MMF_OOM_SKIP 21 /* mm is of no interest for the OOM killer */ #define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */ -#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zer= o page */ +#define MMF_HUGE_ZERO_FOLIO 23 /* mm has ever used the global huge ze= ro folio */ #define MMF_DISABLE_THP 24 /* disable THP for all VMAs */ #define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP) #define MMF_OOM_REAP_QUEUED 25 /* mm was queued for oom_reaper */ diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 6625514f622b..ff06dee213eb 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -248,13 +248,13 @@ static void put_huge_zero_folio(void) =20 struct folio *mm_get_huge_zero_folio(struct mm_struct *mm) { - if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags)) + if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags)) return READ_ONCE(huge_zero_folio); =20 if (!get_huge_zero_folio()) return NULL; =20 - if (test_and_set_bit(MMF_HUGE_ZERO_PAGE, &mm->flags)) + if (test_and_set_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags)) put_huge_zero_folio(); =20 return READ_ONCE(huge_zero_folio); @@ -262,7 +262,7 @@ struct folio *mm_get_huge_zero_folio(struct mm_struct *= mm) =20 void mm_put_huge_zero_folio(struct mm_struct *mm) { - if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags)) + if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags)) put_huge_zero_folio(); } =20 --=20 2.49.0