-systemd is controlling the whole boot process including mount
operation (apart root filesystem) and as I can see, uses heavily
sockets to do it (not to mention cpu-affinity). It controls also the
major part of umount operations. Is it possible that your patch hits
a systemd bug ?
Is it possible that systemd is using network operations that include
synchronize_rcu()? Then if you did the same operation from the
command line at runtime, you might not see the slowdown.
Is it possible for you to convince systemd to collect RCU event tracing
during the slow operation? RCU event tracing is available under
/sys/kernel/debug/tracing/rcu.