Re: [PATCH 2/5] x86: ret_from_fork - get rid of jump back

From: Ingo Molnar
Date: Fri Nov 28 2008 - 08:48:23 EST



* Andi Kleen <andi@xxxxxxxxxxxxxx> wrote:

> > But it gets worse than that: checking for _TIF_SYSCALL_TRACE is
> > completely unnecessary here because we clear that flag for every
>
> That's true. I found your 2005 changeset which did that, [...]

that's irrelevant, because all the necessary TIF_ flag processing is
already done in ret_from_sys_call.

The unnecessary TIF_SYSCALL_TRACE code in the 64-bit ret_from_fork was
apparently added by you in 2002:

+ENTRY(ret_from_fork)
+ movq %rbx, %rdi
+ call schedule_tail
+ GET_THREAD_INFO(%rcx)
+ bt $TIF_SYSCALL_TRACE,threadinfo_flags(%rcx)
+ jc rff_trace

when you added it to x86_64 via the changeset quoted below.

at that time the 32-bit code (from which you copied the x86_64 tree,
creating the whole split x86 trees approach) had this simple and
straightforward ret_from_fork implementation:

ENTRY(ret_from_fork)
#if CONFIG_SMP
pushl %ebx
call SYMBOL_NAME(schedule_tail)
addl $4, %esp
#endif
GET_THREAD_INFO(%ebx)
jmp syscall_exit

so by all means the rff_trace/rff_action hack came from you.

Ingo

------------------>