On 3/4/21 9:02 AM, Dave Hansen wrote:
+#define PAGE_UNUSED 0xFDThis whole 'unused_pmd_start' thing was unmentioned in the changelog.
+/*
+ * The unused vmemmap range, which was not yet memset(PAGE_UNUSED) ranges
+ * from unused_pmd_start to next PMD_SIZE boundary.
+ */
+static unsigned long unused_pmd_start __meminitdata;
One tiny suggestion: *Sometimes* for these optimizations, it's easiest
to write the code up without it in one patch, then add the optimization
in the next patch.
It makes it 100% clear what is part of the "core" algorithm and what is
pure optimization.
I don't know if it will work here, but it might be worth taking a look.