tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Removing dbregs
I don't like the dbregs code. We unconditionally write into %dr6 and %dr7 in
userret, that is, during each interruptible kernel->user transition.
Some measurements with PMCs show that the loads of dr6/dr7 are one of the
first sources of recovery cycles during a build.sh - the cycles the CPU spends
recovering from a mispredicted branch or a machine clear event.
We lose many cycles down there. The code should have been written to just
switch dbregs during context switches, and not on each transition.
It could be fixed, but since the PopSS vuln, we actually disabled dbregs by
default (they are now privileged), and I don't think we will ever re-enable
them, given the risk, even though we do have a mitigation for PopSS.
So why not remove the code?
Home |
Main Index |
Thread Index |
Old Index