public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Lee Revell <rlrevell@joe-job.com>
Cc: Andrew Morton <akpm@osdl.org>,
	"Eric W. Biederman" <ebiederm@xmission.com>,
	Ingo Molnar <mingo@elte.hu>,
	"Paul E. McKenney" <paulmck@us.ibm.com>,
	Roland McGrath <roland@redhat.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/4] coredump: speedup SIGKILL sending
Date: Sat, 8 Apr 2006 03:28:38 +0400	[thread overview]
Message-ID: <20060407232838.GA11460@oleg> (raw)
In-Reply-To: <1144354065.2866.116.camel@mindpipe>

On 04/06, Lee Revell wrote:
> On Fri, 2006-04-07 at 03:55 +0400, Oleg Nesterov wrote:
> > On 04/06, Lee Revell wrote:
> > > On Fri, 2006-04-07 at 02:06 +0400, Oleg Nesterov wrote:
> > > > With this patch a thread group is killed atomically under ->siglock.
> > > > This is faster because we can use sigaddset() instead of force_sig_info()
> > > > and this is used in further patches.
> > > >
> > > > Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
> > >
> > > Won't this cause huge latencies when a process with lots of threads is
> > > killed?
> >
> > Yes, irqs are disabled. But this is not worse than 'kill -9 pid', note
> > that __group_complete_signal() or zap_other_threads() do the same.
>
> Those have been problematic in the past.  I am just wondering if this
> will be a latency regression, or if changes elsewhere in your patch
> negate the effect.

zap_process() disables irqs while traversing ->thread_group list.
So yes, if a process has a lot of threads it will be a latency regression.
(but again, __group_complete_signal() does the same while delivering this
signal, so I don't think this change can make things worse).

However this allows us to avoid tasklist_lock in zap_threads() so I think
it is worth it. Please note that tasklist_lock was held while iterating
over _all_ threads in system, not only current's thread group.

Oleg.


  reply	other threads:[~2006-04-07 19:31 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-06 22:06 [PATCH 2/4] coredump: speedup SIGKILL sending Oleg Nesterov
2006-04-06 19:45 ` Lee Revell
2006-04-06 23:55   ` Oleg Nesterov
2006-04-06 20:07     ` Lee Revell
2006-04-07 23:28       ` Oleg Nesterov [this message]
2006-04-07 19:42         ` Lee Revell
2006-04-10  4:11 ` Roland McGrath

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=20060407232838.GA11460@oleg \
    --to=oleg@tv-sign.ru \
    --cc=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@us.ibm.com \
    --cc=rlrevell@joe-job.com \
    --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