All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: pj@sgi.com, linux-kernel@vger.kernel.org, ebiederm@xmission.com
Subject: Re: [RFC] ps command race fix
Date: Mon, 24 Jul 2006 19:33:18 -0700	[thread overview]
Message-ID: <20060724193318.d57983c1.akpm@osdl.org> (raw)
In-Reply-To: <20060725110835.59c13576.kamezawa.hiroyu@jp.fujitsu.com>

On Tue, 25 Jul 2006 11:08:35 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> wrote:

> > Then the seek and read and such semantics are nice and stable and
> > simple.
> > 
> yes...
> I think snapshot at open() is okay.

We cannot do a single kmalloc() like cpuset does.

The kernel presently kind-of guarantees that a 32k kmalloc() will work,
although the VM might have to do very large amounts of work to achieve it.

But 32k is only 8192 processes, so a snapshot will need multiple
allocations and a list and trouble dropping and retaking tasklist_lock to
allocate memory and keeping things stable while doing that.  I suspect
it'll end up ugly.

And it permits userspace to pin rather a lot of memory.

  reply	other threads:[~2006-07-25  2:33 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-07-14 11:39 [RFC] ps command race fix KAMEZAWA Hiroyuki
2006-07-25  1:20 ` Andrew Morton
2006-07-25  1:48   ` Paul Jackson
2006-07-25  2:00     ` Andrew Morton
2006-07-25  2:08     ` KAMEZAWA Hiroyuki
2006-07-25  2:33       ` Andrew Morton [this message]
2006-07-25  2:50         ` KAMEZAWA Hiroyuki
2006-07-25  3:16           ` KAMEZAWA Hiroyuki
2006-08-13 16:29             ` Eric W. Biederman
2006-08-13 17:34               ` Andrew Morton
2006-08-13 19:00                 ` Eric W. Biederman
2006-08-13 19:12                   ` Paul Jackson
2006-08-16  1:23                     ` KAMEZAWA Hiroyuki
2006-08-17  4:59                       ` Eric W. Biederman
2006-08-17  6:32                         ` KAMEZAWA Hiroyuki
2006-08-17 13:39                           ` Eric W. Biederman
2006-08-17 18:16                             ` Jean Delvare
2006-08-18  0:21                             ` KAMEZAWA Hiroyuki
2006-08-18  3:53                           ` Eric W. Biederman
2006-08-13 20:08               ` Albert Cahalan
2006-08-16  2:20                 ` Kyle Moffett
2006-07-25  7:22         ` Paul Jackson
2006-07-25  1:53   ` KAMEZAWA Hiroyuki
2006-07-25  2:06     ` Andrew Morton
2006-07-25  2:34       ` KAMEZAWA Hiroyuki
2006-07-25  6:09   ` Eric W. Biederman
  -- strict thread matches above, loose matches on Subject: below --
2006-07-25  6:47 Albert Cahalan

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=20060724193318.d57983c1.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=ebiederm@xmission.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pj@sgi.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.