On Thu, 28 Dec 2023, [email protected] wrote:

--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -626,7 +628,14 @@ struct mm_struct {
                unsigned long mmap_compat_legacy_base;
#endif
                unsigned long task_size;        /* size of task vm space */
-               pgd_t * pgd;
+#ifndef CONFIG_KERNEL_REPLICATION
+               pgd_t *pgd;
+#else
+               union {
+                       pgd_t *pgd;
+                       pgd_t *pgd_numa[MAX_NUMNODES];
+               };
+#endif


Hmmm... This is adding the pgd pointers for all mm_structs. But we only need the numa pgs pointers for the init_mm. Can this be a separate variable? There are some architecures with larger number of nodes.


Reply via email to