* [PATCH 4/3] thread_group_cputime: move a couple of callsites outside of ->siglock
@ 2008-11-17 14:40 Oleg Nesterov
2008-11-17 15:57 ` Ingo Molnar
0 siblings, 1 reply; 2+ messages in thread
From: Oleg Nesterov @ 2008-11-17 14:40 UTC (permalink / raw)
To: Andrew Morton, Ingo Molnar, Roland McGrath
Cc: Doug Chapman, Frank Mayhar, Peter Zijlstra, linux-kernel
->siglock buys nothing for thread_group_cputime() in do_sys_times() and
wait_task_zombie() (which btw takes the unrelated parent's ->siglock).
Actually I think do_sys_times() doesn't need ->siglock at all.
Signed-off-by: Oleg Nesterov <oleg@redhat.com>
--- K-28/kernel/exit.c~SYS_TIMES_NO_SIGLOCK 2008-11-10 15:07:22.000000000 +0100
+++ K-28/kernel/exit.c 2008-11-17 02:02:12.000000000 +0100
@@ -1330,10 +1330,10 @@ static int wait_task_zombie(struct task_
* group, which consolidates times for all threads in the
* group including the group leader.
*/
+ thread_group_cputime(p, &cputime);
spin_lock_irq(&p->parent->sighand->siglock);
psig = p->parent->signal;
sig = p->signal;
- thread_group_cputime(p, &cputime);
psig->cutime =
cputime_add(psig->cutime,
cputime_add(cputime.utime,
--- K-28/kernel/sys.c~SYS_TIMES_NO_SIGLOCK 2008-11-06 19:11:02.000000000 +0100
+++ K-28/kernel/sys.c 2008-11-17 01:56:17.000000000 +0100
@@ -858,8 +858,8 @@ void do_sys_times(struct tms *tms)
struct task_cputime cputime;
cputime_t cutime, cstime;
- spin_lock_irq(¤t->sighand->siglock);
thread_group_cputime(current, &cputime);
+ spin_lock_irq(¤t->sighand->siglock);
cutime = current->signal->cutime;
cstime = current->signal->cstime;
spin_unlock_irq(¤t->sighand->siglock);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 4/3] thread_group_cputime: move a couple of callsites outside of ->siglock
2008-11-17 14:40 [PATCH 4/3] thread_group_cputime: move a couple of callsites outside of ->siglock Oleg Nesterov
@ 2008-11-17 15:57 ` Ingo Molnar
0 siblings, 0 replies; 2+ messages in thread
From: Ingo Molnar @ 2008-11-17 15:57 UTC (permalink / raw)
To: Oleg Nesterov
Cc: Andrew Morton, Roland McGrath, Doug Chapman, Frank Mayhar,
Peter Zijlstra, linux-kernel
* Oleg Nesterov <oleg@redhat.com> wrote:
> ->siglock buys nothing for thread_group_cputime() in do_sys_times() and
> wait_task_zombie() (which btw takes the unrelated parent's ->siglock).
> Actually I think do_sys_times() doesn't need ->siglock at all.
>
> Signed-off-by: Oleg Nesterov <oleg@redhat.com>
applied your changes to tip/core/signal:
2b5fe6d: thread_group_cputime: move a couple of callsites outside of ->siglock
ce39447: thread_group_cputime: kill the bogus ->signal != NULL check
74fcd52: account_steal_time: kill the unneeded account_group_system_time()
(merged the sched/urgent fixlet before them)
thanks Oleg!
Ingo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-11-17 15:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-17 14:40 [PATCH 4/3] thread_group_cputime: move a couple of callsites outside of ->siglock Oleg Nesterov
2008-11-17 15:57 ` Ingo Molnar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox