public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@tv-sign.ru>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Daniel Hokka Zakrisson <daniel@hozac.com>,
	linux-kernel@vger.kernel.org,
	containers@lists.linux-foundation.org, ebiederm@xmission.com,
	akpm@linux-foundation.org
Subject: Re: [PATCH 1/2] signals: kill(-1) should only signal processes in the same namespace
Date: Thu, 17 Jul 2008 21:32:54 +0400	[thread overview]
Message-ID: <20080717173254.GA20948@tv-sign.ru> (raw)
In-Reply-To: <487F6B2E.40101@openvz.org>

On 07/17, Pavel Emelyanov wrote:
>
> Daniel Hokka Zakrisson wrote:
> > 
> > The way zap_pid_ns_processes does it is worse, since it signals every
> > thread in the namespace rather than every thread group. So either we walk
> 
> It's questionable whether there are more "threads in a pid namespace" than
> "processes in a system".
> 
> E.g. on my notebook there are ~110 processes and ~150 threads. So having 
> this setup launched in 10 containers you'll have to walk 1100 tasks, while
> zap_pid_ns_processes only 150 ;)
> 
> Some real-life example with containers: on one of our servers with 10 
> containers serving as git repo, bulding system and some other stuff there 
> are ~200 process totally and ~20 threads in each container. See?
> 
> I tend to believe that walking threads in a container is cheaper then
> walking processes in a system...

kill_something_info() can't walk threads, think about the realtime signals.

Anyway, I think we should change kill_something_info(-1) to use rcu_read_lock()
instead of tasklist.

Oleg.


  reply	other threads:[~2008-07-17 17:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-17 14:55 [PATCH 1/2] signals: kill(-1) should only signal processes in the same namespace Daniel Hokka Zakrisson
2008-07-17 15:01 ` Pavel Emelyanov
2008-07-17 15:24   ` Daniel Hokka Zakrisson
2008-07-17 15:54     ` Pavel Emelyanov
2008-07-17 17:32       ` Oleg Nesterov [this message]
2008-07-17 17:50         ` Eric W. Biederman
2008-07-17 17:45     ` Eric W. Biederman
2008-07-17 18:39       ` Daniel Hokka Zakrisson
2008-07-17 18:45         ` Eric W. Biederman
2008-07-17 18:13 ` sukadev
2008-07-17 18:44   ` Daniel Hokka Zakrisson
2008-07-17 18:46   ` Eric W. Biederman
2008-07-23 14:34 ` Oleg Nesterov
2008-07-23 16:09   ` Daniel Hokka Zakrisson

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=20080717173254.GA20948@tv-sign.ru \
    --to=oleg@tv-sign.ru \
    --cc=akpm@linux-foundation.org \
    --cc=containers@lists.linux-foundation.org \
    --cc=daniel@hozac.com \
    --cc=ebiederm@xmission.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xemul@openvz.org \
    /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