From owner-freebsd-hackers Sat May 31 14:19:27 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA13815 for hackers-outgoing; Sat, 31 May 1997 14:19:27 -0700 (PDT) Received: from agora.rdrop.com (root@agora.rdrop.com [199.2.210.241]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA13809 for ; Sat, 31 May 1997 14:19:25 -0700 (PDT) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by agora.rdrop.com (8.8.5/8.8.5) with SMTP id OAA10131 for ; Sat, 31 May 1997 14:19:21 -0700 (PDT) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id WAA22410; Sat, 31 May 1997 22:44:21 +0200 From: Luigi Rizzo Message-Id: <199705312044.WAA22410@labinfo.iet.unipi.it> Subject: Re: WHy does Appache eat my system? To: terry@lambert.org (Terry Lambert) Date: Sat, 31 May 1997 22:44:21 +0200 (MET DST) Cc: julian@whistle.com, julian@alpo.whistle.com, hackers@FreeBSD.ORG In-Reply-To: <199705311825.LAA10995@phaeton.artisoft.com> from "Terry Lambert" at May 31, 97 11:25:00 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > Secondly, the identifier used in tsleep/wakeup is actually hashed > > and collisions might occur. Since the hash table is relatively > > small (128 entries) collisions are not that unlikely. > > This is an error. The usage of the tsleep() family of functions > requires that a unique sleep address be treated uniquely. I think > maybe you are misreading the code. you are very right, I did not see a test "if (p->p_wchan == ident) {" in wakeup(). > SVR4 implements a "wakeone" function in addition to "wakeup". For > the reasons noted in my other post, this is not an optimal soloution. There appears to be a wakeup_one() function in the same file as wakeup(), but it is never used (or so it seems, after grepping the source tree). Cheers Luigi