From: Oleg Nesterov <oleg@redhat.com>
To: Andrew Morton <akpm@linux-foundation.org>,
Ingo Molnar <mingo@elte.hu>, Roland McGrath <roland@redhat.com>
Cc: Doug Chapman <doug.chapman@hp.com>,
Frank Mayhar <fmayhar@google.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH 4/3] thread_group_cputime: move a couple of callsites outside of ->siglock
Date: Mon, 17 Nov 2008 15:40:08 +0100 [thread overview]
Message-ID: <20081117144008.GA5386@redhat.com> (raw)
->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);
next reply other threads:[~2008-11-17 13:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-17 14:40 Oleg Nesterov [this message]
2008-11-17 15:57 ` [PATCH 4/3] thread_group_cputime: move a couple of callsites outside of ->siglock Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20081117144008.GA5386@redhat.com \
--to=oleg@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=doug.chapman@hp.com \
--cc=fmayhar@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.org \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox