Re: s390 && user_enable_single_step() (Was: odd utrace testing results on s390x)

Oleg Nesterov
2010-01-21T20:32:33Z

On 01/07, Martin Schwidefsky wrote:
>
> On Wed, 6 Jan 2010 12:56:33 -0800 (PST)
> Roland McGrath <roland@redhat.com> wrote:
>
> > In other circumstances with utrace, it is very possible to wind up with
> > user_disable_single_step being called superfluously when there was no
> > stop (and so not necessarily any context switch or other high overhead).
> > On other machines, user_disable_single_step is pretty cheap even where
> > user_enable_single_step is quite costly. Given how simple and cheap it
> > is to short-circuit the excess work on s390, I think it is worthwhile.
>
> We could use the same compare of the control registers as the code in
> __switch_to. See below.

FYI, I tested your c3311c13adc1021e986fef12609ceb395ffc5014 commit which
does this optimization (compared to the patch you sent previously), it
works fine.

But please see another email I am going to send...

Oleg.