看板 FB_smp 關於我們 聯絡資訊
On 28-May-2002 Alfred Perlstein wrote: > * John Baldwin <jhb@FreeBSD.org> [020528 13:21] wrote: >> >> On 28-May-2002 Jeffrey Hsu wrote: >> > > Reduce contention upon locking a socket buffer by replacing tsleep() and >> > > wakeup() with a condvar. >> > >> > I'd prefer if we waited until we had the networking stack all locked up >> > before measuring and deciding that there is enough contention on socket >> > buffers to warrant this change. >> >> I don't really see how this change avoids contention anyways. > > The stuff we talked about... using the mutex associated with the > condvar rather than the schedlock to protect the cv's wait queue. > Basically reduce contention on the global wait queues and schedlock. Hmm, well, that won't be a valid assumption for bug so long anyways as cv's wont' have their own queue forever but will probably share their queue's with tsleep in the future. It's an implementation detail. I don't care if you use cv's instead of sleep/wakeup since cv's are often used with mutexes, but reduced contention isn't really a valid reason to use them. -- John Baldwin <jhb@FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve!" - http://www.FreeBSD.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-smp" in the body of the message