Skip to content

RFC Introduce task_pid api

Serge E. Hallyn lkml 1 version In review

Get series with b4
b4 am 20051114212341.724084000@sergelap

Versions newest first

  1. v1 RFC Latest13 patches 70 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13Change pid accesses: driversdrivers/acorn/block/fd1772.c drivers/acpi/osl.c drivers/block/ataflop.c +43 more+94 -940 replies
2/13Change pid accesses: most archsarch/alpha/kernel/semaphore.c arch/alpha/kernel/signal.c arch/alpha/kernel/traps.c +102 more+194 -1930 replies
3/13Change pid accesses: filesystems.fs/9p/debug.h fs/9p/fid.c fs/afs/cmservice.c +40 more+86 -830 replies
4/13Change pid accesses: include/.include/linux/reiserfs_fs.h include/net/scm.h+2 -20 replies
5/13Change pid accesses: ipcipc/mqueue.c ipc/msg.c ipc/sem.c +1 more+14 -140 replies
6/13Change pid accesses: kernel/kernel/acct.c kernel/auditsc.c kernel/capability.c +16 more+89 -850 replies
7/13Change pid accesses: lib/lib/rwsem-spinlock.c lib/rwsem.c lib/smp_processor_id.c +1 more+9 -90 replies
8/13Change pid accesses: mm/mm/nommu.c mm/oom_kill.c+12 -120 replies
9/13Change pid accesses: net/net/core/pktgen.c net/core/rtnetlink.c net/core/scm.c +13 more+24 -230 replies
10/13Change pid accesses: security/security/commoncap.c security/keys/process_keys.c security/keys/request_key_auth.c +2 more+15 -150 replies
11/13Change pid accesses: sound/sound/core/control.c sound/core/pcm.c sound/core/rawmidi.c +6 more+15 -150 replies
12/13Change pid accesses: ia64 and mipsarch/ia64/ia32/ia32_signal.c arch/ia64/ia32/sys_ia32.c arch/ia64/kernel/mca.c +20 more+200 -2003 replies
13/13Define new task_pid apiinclude/linux/sched.h+13 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC] [PATCH 00/13] Introduce task_pid api

--

I'm part of a project implementing checkpoint/restart processes. After a process or group of processes is checkpointed, killed, and restarted, the changing of pids could confuse them. There are many other such issues, but we wanted to start with pids.

This patchset introduces functions to access task->pid and ->tgid, and updates ->pid accessors to use the functions. This is in preparation for a subsequent patchset which will separate the kernel and virtualized pidspaces. This will allow us to virtualize pids from users' pov, so that, for instance, a checkpointed set of processes could be restarted with particular pids. Even though their kernel pids may already be in use by new processes, the checkpointed processes can be started in a new user pidspace with their old virtual pid. This also gives vserver a simpler way to fake vserver init processes as pid 1. Note that this does not change the kernel's internal idea of pids, only what users see.

The first 12 patches change all locations which access ->pid and ->tgid to use the inlined functions. The last patch actually introduces task_pid() and task_tgid(), and renames ->pid and ->tgid to __pid and __tgid to make sure any uncaught users error out.

Does something like this, presumably after much working over, seem mergeable?

thanks
-serge