linux-kernel-test/include
Oleg Nesterov 73b9ebfe12 [PATCH] pidhash: don't count idle threads
fork_idle() does unhash_process() just after copy_process().  Contrary,
boot_cpu's idle thread explicitely registers itself for each pid_type with nr
= 0.

copy_process() already checks p->pid != 0 before process_counts++, I think we
can just skip attach_pid() calls and job control inits for idle threads and
kill unhash_process().  We don't need to cleanup ->proc_dentry in fork_idle()
because with this patch idle threads are never hashed in
kernel/pid.c:pid_hash[].

We don't need to hash pid == 0 in pidmap_init().  free_pidmap() is never
called with pid == 0 arg, so it will never be reused.  So it is still possible
to use pid == 0 in any PIDTYPE_xxx namespace from kernel/pid.c's POV.

However with this patch we don't hash pid == 0 for PIDTYPE_PID case.  We still
have have PIDTYPE_PGID/PIDTYPE_SID entries with pid == 0: /sbin/init and
kernel threads which don't call daemonize().

Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-28 18:36:41 -08:00
..
acpi
asm-alpha [PATCH] alpha: make poll flags the same as other architectures 2006-03-28 09:16:02 -08:00
asm-arm Merge master.kernel.org:/home/rmk/linux-2.6-arm 2006-03-28 13:53:03 -08:00
asm-arm26 [PATCH] unify pfn_to_page: arm26 pfn_to_page 2006-03-27 08:44:44 -08:00
asm-cris [PATCH] unify pfn_to_page: cris pfn_to_page 2006-03-27 08:44:45 -08:00
asm-frv [PATCH] lightweight robust futexes updates 2006-03-27 08:44:49 -08:00
asm-generic [PATCH] for_each_possible_cpu: fixes for generic part 2006-03-28 09:16:05 -08:00
asm-h8300 [PATCH] unify pfn_to_page: h8300 pfn_to_page 2006-03-27 08:44:45 -08:00
asm-i386 [PATCH] arch/i386/kernel/microcode.c: remove the obsolete microcode_ioctl 2006-03-28 09:16:06 -08:00
asm-ia64 [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
asm-m32r [PATCH] unify PFN_* macros 2006-03-27 08:44:48 -08:00
asm-m68k [PATCH] m68k: fix undefined reference to generic_find_next_zero_le_bit 2006-03-26 08:57:13 -08:00
asm-m68knommu [PATCH] bitops: m68knommu: use generic bitops 2006-03-26 08:57:13 -08:00
asm-mips Merge master.kernel.org:/home/rmk/linux-2.6-serial 2006-03-28 13:52:37 -08:00
asm-parisc [PATCH] Typo fixes 2006-03-28 09:16:08 -08:00
asm-powerpc [PATCH] Notifier chain update: API changes 2006-03-27 08:44:50 -08:00
asm-ppc [PATCH] unify pfn_to_page: ppc pfn_to_page 2006-03-27 08:44:46 -08:00
asm-s390 [PATCH] s390: add ptr_to_compat() 2006-03-27 08:44:48 -08:00
asm-sh [PATCH] Typo fixes 2006-03-28 09:16:08 -08:00
asm-sh64 [PATCH] unify PFN_* macros 2006-03-27 08:44:48 -08:00
asm-sparc [PATCH] unify pfn_to_page: sparc pfn_to_page 2006-03-27 08:44:46 -08:00
asm-sparc64 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6 2006-03-28 09:25:22 -08:00
asm-um [PATCH] unify pfn_to_page: uml pfn_to_page 2006-03-27 08:44:46 -08:00
asm-v850 [PATCH] unify pfn_to_page: v850 pfn_to_page 2006-03-27 08:44:47 -08:00
asm-x86_64 [PATCH] arch/i386/kernel/microcode.c: remove the obsolete microcode_ioctl 2006-03-28 09:16:06 -08:00
asm-xtensa [PATCH] unify pfn_to_page: xtensa pfn_to_page 2006-03-27 08:44:47 -08:00
keys
linux [PATCH] pidhash: don't count idle threads 2006-03-28 18:36:41 -08:00
math-emu
media V4L/DVB (3599): Implement new routing commands for wm8775 and cs53l32a. 2006-03-24 16:27:00 -03:00
mtd
net Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 2006-03-27 08:47:29 -08:00
pcmcia
rdma
rxrpc
scsi
sound [PATCH] mark f_ops const in the inode 2006-03-28 09:16:05 -08:00
video [PATCH] Remove MODULE_PARM 2006-03-25 08:22:52 -08:00