tech-kern archive

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

Re: Removing dbregs



On 26.07.2018 10:45, Maxime Villard wrote:
> 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.
> 

No, XEN was untested - I don't have resources for XEN testing.

This patch is x86-style agnostic and should just work. I will keep
observing the releng machines. So far there were no issues on Xen and it
will likely be the same this time.

>>  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.

This is fine.

Attachment: signature.asc
Description: OpenPGP digital signature



Home | Main Index | Thread Index | Old Index