Re: [PATCH v3 3/3] x86: usercopy: reimplement arch_within_stack_frames with unwinder
From: Josh Poimboeuf
Date: Tue Apr 10 2018 - 11:35:44 EST
On Mon, Apr 09, 2018 at 01:14:58PM +0000, David Laight wrote:
> From: kpark3469@xxxxxxxxx
> > Sent: 09 April 2018 12:59
> >
> > The old arch_within_stack_frames which used the frame pointer is
> > now reimplemented to use frame pointer unwinder apis. So the main
> > functionality is same as before.
>
> How much slower does this make the code?
> Following stack frames using %bp is reasonably quick.
> I can't imagine some of the other unwinder APIs being any where
> near that fast.
> While fine for fault tracebacks, using them during usercopy
> is likely to have measurable performance impact.
Agreed, using the unwind interface is going to be quite a bit slower
than the current manual approach. So this patch has only drawbacks and
no benefits.
The only benefit would be if you used the unwind API in a generic
manner, such that it also worked for the ORC unwinder. But even then I
think we'd need to see performance numbers, with both FP and ORC, to see
how bad the impact is on usercopy.
--
Josh