kernel_optimize_test/kernel
Eric W. Biederman 99f8955183 [PATCH] proc: don't lock task_structs indefinitely
Every inode in /proc holds a reference to a struct task_struct.  If a
directory or file is opened and remains open after the the task exits this
pinning continues.  With 8K stacks on a 32bit machine the amount pinned per
file descriptor is about 10K.

Normally I would figure a reasonable per user process limit is about 100
processes.  With 80 processes, with a 1000 file descriptors each I can trigger
the 00M killer on a 32bit kernel, because I have pinned about 800MB of useless
data.

This patch replaces the struct task_struct pointer with a pointer to a struct
task_ref which has a struct task_struct pointer.  The so the pinning of dead
tasks does not happen.

The code now has to contend with the fact that the task may now exit at any
time.  Which is a little but not muh more complicated.

With this change it takes about 1000 processes each opening up 1000 file
descriptors before I can trigger the OOM killer.  Much better.

[mlp@google.com: task_mmu small fixes]
Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Paul Jackson <pj@sgi.com>
Cc: Oleg Nesterov <oleg@tv-sign.ru>
Cc: Albert Cahalan <acahalan@gmail.com>
Signed-off-by: Prasanna Meda <mlp@google.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-06-26 09:58:25 -07:00
..
irq
power Revert "swsusp special saveable pages support" commits 2006-06-25 18:41:00 -07:00
time [PATCH] time: rename clocksource functions 2006-06-26 09:58:21 -07:00
.gitignore
acct.c [PATCH] pacct: none-delayed process accounting accumulation 2006-06-25 10:01:25 -07:00
audit.c
audit.h
auditfilter.c
auditsc.c
capability.c
compat.c [PATCH] N32 sigset and __COMPAT_ENDIAN_SWAP__ 2006-06-25 10:01:15 -07:00
configs.c
cpu.c [PATCH] Convert kernel/cpu.c to mutexes 2006-06-26 09:58:16 -07:00
cpuset.c [PATCH] proc: don't lock task_structs indefinitely 2006-06-26 09:58:25 -07:00
dma.c
exec_domain.c
exit.c [PATCH] proc: Rewrite the proc dentry flush on exit optimization 2006-06-26 09:58:24 -07:00
extable.c
fork.c [PATCH] proc: Rewrite the proc dentry flush on exit optimization 2006-06-26 09:58:24 -07:00
futex_compat.c
futex.c
hrtimer.c [PATCH] ktime/hrtimer: fix kernel-doc comments 2006-06-25 10:01:23 -07:00
itimer.c
kallsyms.c
Kconfig.hz
Kconfig.preempt
kexec.c
kfifo.c
kmod.c
kprobes.c [PATCH] Notify page fault call chain 2006-06-26 09:58:22 -07:00
ksysfs.c
kthread.c [PATCH] kthread: move kernel-doc and put it into DocBook 2006-06-25 10:01:24 -07:00
Makefile [PATCH] Time: Use clocksource infrastructure for update_wall_time 2006-06-26 09:58:20 -07:00
module.c [PATCH] ensure NULL deref can't possibly happen in is_exported() 2006-06-25 10:00:59 -07:00
mutex-debug.c [PATCH] work around ppc64 bootup bug by making mutex-debugging save/restore irqs 2006-06-26 09:58:16 -07:00
mutex-debug.h [PATCH] work around ppc64 bootup bug by making mutex-debugging save/restore irqs 2006-06-26 09:58:16 -07:00
mutex.c [PATCH] work around ppc64 bootup bug by making mutex-debugging save/restore irqs 2006-06-26 09:58:16 -07:00
mutex.h [PATCH] work around ppc64 bootup bug by making mutex-debugging save/restore irqs 2006-06-26 09:58:16 -07:00
panic.c
params.c
pid.c
posix-cpu-timers.c
posix-timers.c
printk.c [PATCH] printk time parameter 2006-06-25 10:01:13 -07:00
profile.c
ptrace.c
rcupdate.c
rcutorture.c
relay.c
resource.c
sched.c [PATCH] cpu hotplug: fix CPU_UP_CANCEL handling 2006-06-25 10:01:22 -07:00
seccomp.c
signal.c
softirq.c [PATCH] cpu hotplug: fix CPU_UP_CANCEL handling 2006-06-25 10:01:22 -07:00
softlockup.c [PATCH] cpu hotplug: fix CPU_UP_CANCEL handling 2006-06-25 10:01:22 -07:00
spinlock.c
stop_machine.c [PATCH] kthread: convert stop_machine into a kthread 2006-06-25 10:01:22 -07:00
sys_ni.c
sys.c [PATCH] kernel/sys.c: cleanups 2006-06-25 10:01:06 -07:00
sysctl.c [PATCH] Get rid of /proc/sys/proc 2006-06-25 10:01:15 -07:00
time.c [PATCH] Time: Introduce arch generic time accessors 2006-06-26 09:58:20 -07:00
timer.c [PATCH] fix and optimize clock source update 2006-06-26 09:58:21 -07:00
uid16.c
user.c
wait.c
workqueue.c [PATCH] cpu hotplug: fix CPU_UP_CANCEL handling 2006-06-25 10:01:22 -07:00