[OS-BUILD PATCHv2 2/2] mm/cma: mark CMA on x86_64 tech preview and print RHEL-specific infos

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: David Hildenbrand <david@xxxxxxxxxx>

mm/cma: mark CMA on x86_64 tech preview and print RHEL-specific infos

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1945002
Upstream: RHEL only

CMA is Tech Preview in RHEL 9 for x86_64; to detect the use of CMA easily,
taint the kernel via mark_tech_preview(). Further print an info when
cma_alloc() is getting called for the first time.

Keep s390x (for vmcp) and ppc64 (for KVM) unmodified, as they have been
automatically creating CMA regions already in RHEL 8.

Signed-off-by: David Hildenbrand <david@xxxxxxxxxx>

diff a/mm/cma.c b/mm/cma.c
--- a/mm/cma.c
+++ b/mm/cma.c
@@ -125,6 +125,12 @@ static void __init cma_activate_area(struct cma *cma)
 	spin_lock_init(&cma->mem_head_lock);
 #endif
 
+#ifdef CONFIG_RHEL_DIFFERENCES
+	/* s390x and ppc64 has been using CMA already in RHEL 8 as default. */
+	if (!IS_ENABLED(CONFIG_S390) && !IS_ENABLED(CONFIG_PPC64))
+		mark_tech_preview("CMA", NULL);
+#endif /* CONFIG_RHEL_DIFFERENCES */
+
 	return;
 
 not_in_zone:
@@ -437,6 +443,10 @@ struct page *cma_alloc(struct cma *cma, size_t count, unsigned int align,
 	if (!cma || !cma->count || !cma->bitmap)
 		return NULL;
 
+#ifdef CONFIG_RHEL_DIFFERENCES
+	pr_info_once("%s() got called for the first time\n", __func__);
+#endif /* CONFIG_RHEL_DIFFERENCES */
+
 	pr_debug("%s(cma %p, count %zu, align %d)\n", __func__, (void *)cma,
 		 count, align);
 

--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1023
_______________________________________________
kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx
Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure




[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux