On Sat, Dec 31, 2011 at 6:34 AM, Hongli Lai <[email protected]> wrote:
> The benchmark tool in the Samba presentation also surprised me. It > showed that processes are indeed a bit faster at various system calls, > but only slightly so. Still doesn't make much sense to me though > because the kernel already has to protect its data structures against > concurrent accesses by multiple processes, no matter whether those > processes are multithreaded as well. > > Well there's the added complication that under threads, the kernel now has to be careful about user-space memory access as well in some cases. Related, I've observed some similar automatic slowdowns because of pthreads cancellation checks. As soon as you're running pthreads, all sorts of syscalls become cancellation points, and every time they're invoked a quick check has to be performed to see whether another thread has sent you pthread_cancel().
_______________________________________________ libev mailing list [email protected] http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev
