cvs commit: src/sys/conf files src/sys/kern init_main.c
kern_cpuset.c kern_thread.c syscalls.master src/sys/sys _types.h
cpuset.h proc.h types.h src/lib/libc/sys Symbol.map
davidxu at FreeBSD.org
Mon Mar 3 09:05:12 UTC 2008
David Xu wrote:
> The cpuset_setaffinity with command CPU_WHICH_TID may hurt another
> process if a weird process is out of the control.
> The current code intents to lookup globally a thread has exact thread
> id, because thread may be created and exited quickly, and thread ID is
> reused quickly too, it is possible the weird process gives an outdated
> thread ID to the API, and an irrelvant thread within another process
> belongs to same user gets bind to cpus, such problem is very difficult
> to be diagnosed when it happens, and it is an administrator is
> nightmare. I think there should be a CPU_WHICH_TID_LOCAL command
> to limit the searching scope in current process, and in most case,
> the CPU_WHICH_TID_LOCAL will be used instead.
> David Xu
or we always pass pid to cpu_setaffinity.
More information about the cvs-src