From: William Lee Irwin III <wli@holomorphy.com>
To: Benjamin LaHaise <bcrl@redhat.com>
Cc: Rik van Riel <riel@conectiva.com.br>,
Ulrich Drepper <drepper@redhat.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [ANNOUNCE] Native POSIX Thread Library 0.1
Date: Thu, 19 Sep 2002 19:47:09 -0700 [thread overview]
Message-ID: <20020920024709.GE3530@holomorphy.com> (raw)
In-Reply-To: <20020919221546.A30103@redhat.com>
On Thu, Sep 19, 2002 at 11:01:33PM -0300, Rik van Riel wrote:
>> So, where did you put those 800 MB of kernel stacks needed for
>> 100,000 threads ?
On Thu, Sep 19, 2002 at 10:15:46PM -0400, Benjamin LaHaise wrote:
> That's what the 4KB stack patch is for. ;-)
> -ben
The task_struct isn't particularly slim either. I heard rumblings
that way back when it was shared with the stack the NR_CPUS arrays
filled (and overflowed) the entire stack... It's also enough to
put a wee bit of pressure on ZONE_NORMAL even on smaller task count
workloads.
Perhaps something like this is in order? vs. 2.5.33:
fs/proc/array.c | 22 ----------------------
fs/proc/base.c | 11 +----------
include/linux/sched.h | 1 -
kernel/fork.c | 11 +----------
kernel/timer.c | 3 ---
5 files changed, 2 insertions(+), 46 deletions(-)
Cheers,
Bill
===== fs/proc/array.c 1.24 vs edited =====
--- 1.24/fs/proc/array.c Thu Jul 4 22:54:38 2002
+++ edited/fs/proc/array.c Tue Jul 16 00:35:26 2002
@@ -592,25 +592,3 @@
out:
return retval;
}
-
-#ifdef CONFIG_SMP
-int proc_pid_cpu(struct task_struct *task, char * buffer)
-{
- int i, len;
-
- len = sprintf(buffer,
- "cpu %lu %lu\n",
- jiffies_to_clock_t(task->utime),
- jiffies_to_clock_t(task->stime));
-
- for (i = 0 ; i < NR_CPUS; i++) {
- if (cpu_online(i))
- len += sprintf(buffer + len, "cpu%d %lu %lu\n",
- i,
- jiffies_to_clock_t(task->per_cpu_utime[i]),
- jiffies_to_clock_t(task->per_cpu_stime[i]));
-
- }
- return len;
-}
-#endif
===== fs/proc/base.c 1.26 vs edited =====
--- 1.26/fs/proc/base.c Wed May 22 08:48:14 2002
+++ edited/fs/proc/base.c Tue Jul 16 00:36:12 2002
@@ -52,7 +52,6 @@
PROC_PID_STAT,
PROC_PID_STATM,
PROC_PID_MAPS,
- PROC_PID_CPU,
PROC_PID_MOUNTS,
PROC_PID_FD_DIR = 0x8000, /* 0x8000-0xffff */
};
@@ -72,9 +71,6 @@
E(PROC_PID_CMDLINE, "cmdline", S_IFREG|S_IRUGO),
E(PROC_PID_STAT, "stat", S_IFREG|S_IRUGO),
E(PROC_PID_STATM, "statm", S_IFREG|S_IRUGO),
-#ifdef CONFIG_SMP
- E(PROC_PID_CPU, "cpu", S_IFREG|S_IRUGO),
-#endif
E(PROC_PID_MAPS, "maps", S_IFREG|S_IRUGO),
E(PROC_PID_MEM, "mem", S_IFREG|S_IRUSR|S_IWUSR),
E(PROC_PID_CWD, "cwd", S_IFLNK|S_IRWXUGO),
@@ -1003,12 +999,7 @@
case PROC_PID_MAPS:
inode->i_fop = &proc_maps_operations;
break;
-#ifdef CONFIG_SMP
- case PROC_PID_CPU:
- inode->i_fop = &proc_info_file_operations;
- ei->op.proc_read = proc_pid_cpu;
- break;
-#endif
+
case PROC_PID_MEM:
inode->i_op = &proc_mem_inode_operations;
inode->i_fop = &proc_mem_operations;
===== include/linux/sched.h 1.70 vs edited =====
--- 1.70/include/linux/sched.h Thu Jul 4 22:33:26 2002
+++ edited/include/linux/sched.h Tue Jul 16 00:35:26 2002
@@ -325,7 +325,6 @@
struct timer_list real_timer;
unsigned long utime, stime, cutime, cstime;
unsigned long start_time;
- long per_cpu_utime[NR_CPUS], per_cpu_stime[NR_CPUS];
/* mm fault and swap info: this can arguably be seen as either mm-specific or thread-specific */
unsigned long min_flt, maj_flt, nswap, cmin_flt, cmaj_flt, cnswap;
int swappable:1;
===== kernel/fork.c 1.49 vs edited =====
--- 1.49/kernel/fork.c Mon Jul 1 14:41:36 2002
+++ edited/kernel/fork.c Tue Jul 16 00:35:26 2002
@@ -725,16 +725,7 @@
p->tty_old_pgrp = 0;
p->utime = p->stime = 0;
p->cutime = p->cstime = 0;
-#ifdef CONFIG_SMP
- {
- int i;
-
- /* ?? should we just memset this ?? */
- for(i = 0; i < NR_CPUS; i++)
- p->per_cpu_utime[i] = p->per_cpu_stime[i] = 0;
- spin_lock_init(&p->sigmask_lock);
- }
-#endif
+ spin_lock_init(&p->sigmask_lock);
p->array = NULL;
p->lock_depth = -1; /* -1 = no lock */
p->start_time = jiffies;
===== kernel/timer.c 1.17 vs edited =====
--- 1.17/kernel/timer.c Mon Jul 1 14:41:36 2002
+++ edited/kernel/timer.c Tue Jul 16 00:35:26 2002
@@ -569,8 +569,6 @@
void update_one_process(struct task_struct *p, unsigned long user,
unsigned long system, int cpu)
{
- p->per_cpu_utime[cpu] += user;
- p->per_cpu_stime[cpu] += system;
do_process_times(p, user, system);
do_it_virt(p, user);
do_it_prof(p);
next prev parent reply other threads:[~2002-09-20 2:48 UTC|newest]
Thread overview: 114+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-20 0:41 [ANNOUNCE] Native POSIX Thread Library 0.1 Ulrich Drepper
2002-09-20 0:51 ` William Lee Irwin III
2002-09-20 1:35 ` Ulrich Drepper
2002-09-20 1:42 ` William Lee Irwin III
2002-09-20 1:56 ` Larry McVoy
2002-09-20 2:01 ` Rik van Riel
2002-09-20 2:15 ` Benjamin LaHaise
2002-09-20 2:40 ` Dave Hansen
2002-09-20 2:47 ` William Lee Irwin III [this message]
2002-09-20 2:17 ` Larry McVoy
2002-09-20 2:24 ` Rik van Riel
2002-09-20 2:32 ` Ulrich Drepper
2002-09-20 6:01 ` Linus Torvalds
2002-09-20 8:02 ` Ingo Molnar
2002-09-20 2:23 ` Anton Blanchard
2002-09-20 7:52 ` 100,000 threads? [was: [ANNOUNCE] Native POSIX Thread Library 0.1] Ingo Molnar
2002-09-20 15:47 ` Bill Davidsen
2002-09-20 9:53 ` [ANNOUNCE] Native POSIX Thread Library 0.1 Padraig Brady
2002-09-20 13:28 ` Robert Love
2002-09-20 16:01 ` Bill Davidsen
2002-09-20 9:54 ` Adrian Bunk
2002-09-20 10:53 ` Ingo Molnar
2002-09-20 19:04 ` Ulrich Drepper
2002-09-20 23:06 ` J.A. Magallon
2002-09-20 23:33 ` Ulrich Drepper
2002-09-20 23:42 ` J.A. Magallon
2002-09-20 10:20 ` Bill Huey
2002-09-20 10:47 ` Ingo Molnar
2002-09-20 12:06 ` Bill Huey
2002-09-20 16:20 ` Ingo Molnar
2002-09-20 21:50 ` Bill Huey
2002-09-20 22:30 ` dean gaudet
2002-09-20 23:11 ` Bill Huey
2002-09-21 3:38 ` dean gaudet
2002-09-21 4:01 ` Bill Huey
2002-09-21 5:06 ` Ingo Molnar
2002-09-20 23:45 ` Bill Huey
2002-09-21 4:58 ` Ingo Molnar
2002-09-22 2:51 ` Bill Huey
2002-09-21 4:48 ` Ingo Molnar
2002-09-22 1:38 ` Bill Huey
2002-09-22 13:38 ` Bill Davidsen
2002-09-22 18:41 ` Eric W. Biederman
2002-09-22 22:13 ` dean gaudet
2002-09-26 17:21 ` Alan Cox
2002-09-23 0:11 ` Bill Huey
2002-09-24 16:07 ` Eric W. Biederman
2002-09-24 23:21 ` Bill Huey
2002-09-25 3:06 ` Eric W. Biederman
2002-09-23 21:12 ` Bill Huey
2002-09-20 10:35 ` Luca Barbieri
2002-09-20 11:19 ` Ingo Molnar
2002-09-20 18:40 ` Roland McGrath
2002-09-20 21:21 ` Luca Barbieri
2002-09-20 12:37 ` jlnance
2002-09-20 16:42 ` Ingo Molnar
2002-09-24 0:40 ` Rusty Russell
2002-09-24 5:47 ` Ingo Molnar
2002-09-24 6:15 ` Rusty Russell
2002-09-20 15:43 ` Bill Davidsen
2002-09-20 16:15 ` Jakub Jelinek
2002-09-20 17:16 ` Bill Davidsen
2002-09-20 7:46 Joerg Pommnitz
2002-09-22 18:55 Peter Waechtler
2002-09-22 21:32 ` Larry McVoy
2002-09-23 10:05 ` Bill Davidsen
2002-09-23 11:55 ` Peter Waechtler
2002-09-23 19:14 ` Bill Davidsen
2002-09-29 23:26 ` Buddy Lumpkin
2002-09-30 14:54 ` Corey Minyard
2002-09-23 15:30 ` Larry McVoy
2002-09-23 19:44 ` Olivier Galibert
2002-09-23 19:48 ` Bill Davidsen
2002-09-23 20:32 ` Ingo Molnar
2002-09-24 0:03 ` Andy Isaacson
2002-09-24 0:10 ` Jeff Garzik
2002-09-24 0:14 ` Andy Isaacson
2002-09-24 5:53 ` Ingo Molnar
2002-09-24 20:34 ` David Schwartz
2002-09-24 7:12 ` Thunder from the hill
2002-09-24 7:30 ` Ingo Molnar
2002-09-23 22:35 ` Mark Mielke
2002-09-23 19:59 ` Peter Waechtler
2002-09-23 20:36 ` Ingo Molnar
2002-09-23 21:08 ` Peter Wächtler
2002-09-23 22:44 ` Mark Mielke
2002-09-23 23:01 ` Bill Huey
2002-09-23 23:11 ` Mark Mielke
2002-09-24 0:21 ` Bill Huey
2002-09-24 3:20 ` Mark Mielke
2002-09-23 23:57 ` Andy Isaacson
2002-09-24 18:10 ` Christoph Hellwig
2002-09-23 21:32 ` Bill Huey
2002-09-23 21:41 ` dean gaudet
2002-09-23 22:10 ` Bill Huey
2002-09-23 22:56 ` Mark Mielke
2002-09-24 10:02 ` Nikita Danilov
2002-09-23 21:22 ` Bill Huey
2002-09-23 21:03 ` Bill Huey
2002-09-24 12:03 ` Michael Sinz
2002-09-24 13:40 ` Peter Svensson
2002-09-24 14:20 ` Michael Sinz
2002-09-24 20:19 ` David Schwartz
2002-09-24 21:10 ` Chris Friesen
2002-09-24 21:22 ` Rik van Riel
2002-09-24 21:35 ` Roberto Peon
2002-09-24 21:35 ` Chris Friesen
2002-09-25 19:02 ` David Schwartz
2002-09-24 23:16 ` Peter Waechtler
2002-09-24 23:23 ` Rik van Riel
2002-09-25 19:05 ` David Schwartz
2002-09-23 16:36 Matthias Urlichs
[not found] <987738530@toto.iv>
2002-09-24 2:48 ` Peter Chubb
2002-09-24 3:37 ` Mark Mielke
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=20020920024709.GE3530@holomorphy.com \
--to=wli@holomorphy.com \
--cc=bcrl@redhat.com \
--cc=drepper@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=riel@conectiva.com.br \
/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;
as well as URLs for NNTP newsgroup(s).