From owner-freebsd-current Wed Jul 10 10:28:11 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0C8F37B400 for ; Wed, 10 Jul 2002 10:28:07 -0700 (PDT) Received: from mail.speakeasy.net (mail16.speakeasy.net [216.254.0.216]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8AA8243E09 for ; Wed, 10 Jul 2002 10:28:07 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 32110 invoked from network); 10 Jul 2002 17:28:06 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail16.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 10 Jul 2002 17:28:06 -0000 Received: from laptop.baldwin.cx (gw1.twc.weather.com [216.133.140.1]) by server.baldwin.cx (8.11.6/8.11.6) with ESMTP id g6AHS4027663; Wed, 10 Jul 2002 13:28:04 -0400 (EDT) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.5.2 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <200207101616.g6AGG4T28124@arch20m.dellroad.org> Date: Wed, 10 Jul 2002 13:28:09 -0400 (EDT) From: John Baldwin To: Archie Cobbs Subject: Re: Timeout and SMP race Cc: David Xu , freebsd-current@FreeBSD.org, Julian Elischer Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On 10-Jul-2002 Archie Cobbs wrote: > John Baldwin writes: >> It is the same problem. What we do is change callout_stop() to let you know if >> it actually stopped the timeout or not. You then have to use your own locking >> and synchronization in the timeout function and yourself to close the rest of >> the race. > > OK, thanks. > > What do you think of the idea of letting the timer code (optionally) > handle all the locking and race conditions? I'm not sure it can in a clean fashion since of the few cases I've known so far each client needs a customized solution. I am open to ideas though. I'm also open to some redesign of how callouts work to begin with (maybe using other threads than the one running softclock() to actually execute callout handlers, etc.). -- John Baldwin <>< 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-current" in the body of the message