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.
_______________________________________________
cvs-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/cvs-all
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to