Re: [tip:perfcounters/core] perf_counter: x86: Fix call-chain support to use NMI-safe methods

Linus Torvalds
2009-06-15T22:40:53Z

On Mon, 15 Jun 2009, H. Peter Anvin wrote:
>
> cs/ss you could potentially restore with sysret/sysexit, at least for
> the common case. Of course, this means more cases...

Yes. But it gets pretty complicated. You now have to make user space
restore some of the registers, so you end up having to write to the user
space stack etc.

It might be worth it (iret really is very slow, _especially_ to user
space, but it's definitely nontrivial.

Linus