tech-kern archive

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

Re: Removing dbregs



Le 26/07/2018 à 10:41, Kamil Rytarowski a écrit :
On 26.07.2018 09:24, Maxime Villard wrote:
For the record, I ended up with a functional patch [1]. This removes the
reload of DR6/DR7 on each kernel->user transition, and rather does it
during context switches, only when dbregs are being used. Tested ATF on
i386 and amd64, it works.

Kamil wanted to do extra testing, but basically this patch is close to the
final version.

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

It looks good to me. I've tested it under load on i386 and amd64 - for
the past 3 days - with no regression observed.

Did you test on Xen? I made zero test on xen...

By the way, thinking about it, the performance regression of dbregs on xen
was likely seeable, because touching drX is done via hypercalls. In the
default userret path, we were doing ldr7, ldr6 and rdr6, so three hypercalls
on each user->kernel transition.

Whatever, my patch fixes that.

 From a style point of view, I would use the ISSET(9)-like API in the
code, instead of manual bit operations.

For now I'm happier with a &, like the rest of the x86 code.


Home | Main Index | Thread Index | Old Index