"Scott Duplichan" scott@notabs.org writes:
In this report: http://article.gmane.org/gmane.linux.bios/57707, Arne may have been encountering the ClLinesToNbDis issue (assuming the memset code was running from flash). Switching to rep movs would greatly improve performance because unlike a byte loop, rep movs loops in microcode which does not cause continuous flash memory accesses.
This was my assumption as well. After fixing the ClLinesToNbDis setting, I have removed the rep stosb code from my tree, and so far I've not observed the pathological memset behaviour that caused me to put it in in the first place. (As mentioned earlier this was never altogether deterministic, I'm assuming some critical part of the original memset loop needed to straddle cache lines or something for it to manifest.)