revert "Optimize sys_times for a single thread process"
PATCH 2/3 revert "Optimize sys_times for a single thread process"
This patch reverts 'CONFIG_SMP && thread_group_empty()' optimization in sys_times(). The reason is that the next patch breaks memory ordering which is needed for that optimization.
tasklist_lock in sys_times() will be eliminated completely by further patch.
kernel/exit.c renamed from kernel/exit.c~2_REVERT +1 -5
@@ -137,11 +137,7 @@ repeat:ptrace_unlink (p);BUG_ON (!list_empty (&p->ptrace_list) || !list_empty (&p->ptrace_children));__exit_signal (p); -/* -* Note that the fastpath in sys_times depends on __exit_signal having -* updated the counters before a task is removed from the tasklist of -* the process by __unhash_process. -*/ +__unhash_process (p);/*
kernel/sys.c renamed from kernel/sys.c~2_REVERT +25 -59
94 lines not on this page · raw message
Quoted 2 lines · Oleg Nesterov
tasklist_lockinsys_times()will be eliminated completely by further patch.
Where is that patch? The patch would simply drop the locks?
Re: [PATCH 2/3] revert "Optimize sys_times for a single threadprocess"
Quoted 7 lines · Christoph Lameter
Quoted 2 lines · Oleg Nesterov
tasklist_lockinsys_times()will be eliminated completely by further patch.Where is that patch? The patch would simply drop the locks?
Just sent it: "[PATCH 1/6] sys_times: don't take tasklist_lock"
It only drops tasklist_lock, sighand->siglock is still needed, of course.
Oleg.