Date: Mon, 03 Mar 2008 17:06:25 +0800 From: David Xu <davidxu@FreeBSD.org> To: Jeff Roberson <jeff@FreeBSD.org> Cc: cvs-src@FreeBSD.org, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: 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 Message-ID: <47CBBF91.3020404@freebsd.org> In-Reply-To: <47CBBE21.4060104@freebsd.org> References: <200803020739.m227dNLe039427@repoman.freebsd.org> <47CBBE21.4060104@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. > > Regards, > David Xu > > or we always pass pid to cpu_setaffinity.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?47CBBF91.3020404>