On Fri, Jun 19, 2020 at 07:44:29PM -0700, Rick Lindsley wrote: > echo 0 > /sys/devices//system/memory/memory10374/online > > and boom - you've taken memory chunk 10374 offline. > > These changes are not just a whim. I used lockstat to measure contention > during boot. The addition of 250,000 "devices" in parallel created > tremendous contention on the kernfs_mutex and, it appears, on one of the > directories within it where memory nodes are created. Using a mutex means > that the details of that mutex must bounce around all the cpus ... did I > mention 1500+ cpus? A whole lot of thrash ... I don't know. The above highlights the absurdity of the approach itself to me. You seem to be aware of it too in writing: 250,000 "devices". Thanks. -- tejun