tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Removing dbregs



Le 14/07/2018 à 10:29, Martin Husemann a écrit :
On Fri, Jul 13, 2018 at 11:49:33PM +0200, Kamil Rytarowski wrote:
#ifdefing it out in a non-benchmarking application (I was checking ones
that do something with syscalls) is more negligible than 0,3% of
overhead in the kernel in a loop.

My vote is on #ifdef by a default-off kernel option as well.
Next step: optimize the switch, but that is no priority then. Can't we
use pcu(9) for that?

I've written this [1], from memory I think it's enough. Kamil, please test
it, because I intend to commit it soon. Same for i386.

We don't update DR6/DR7 on each return to userland, and rather do it during
context switches, only when one of the two LWPs is using dbregs. When none
is (which always is the case), we don't touch.

[1] http://m00nbsd.net/garbage/dbregs/amd64.diff


Home | Main Index | Thread Index | Old Index