From owner-freebsd-current Mon Jul 8 12:27:22 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 90FA337B400 for ; Mon, 8 Jul 2002 12:27:20 -0700 (PDT) Received: from mail.speakeasy.net (mail12.speakeasy.net [216.254.0.212]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3264043E31 for ; Mon, 8 Jul 2002 12:27:20 -0700 (PDT) (envelope-from jhb@FreeBSD.org) Received: (qmail 24164 invoked from network); 8 Jul 2002 19:27:18 -0000 Received: from unknown (HELO server.baldwin.cx) ([216.27.160.63]) (envelope-sender ) by mail12.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 8 Jul 2002 19:27:18 -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 g68JRGf05207; Mon, 8 Jul 2002 15:27:16 -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: <001101c222fa$9b32eed0$ef01a8c0@davidwnt> Date: Mon, 08 Jul 2002 15:27:22 -0400 (EDT) From: John Baldwin To: David Xu Subject: RE: Timeout and SMP race Cc: 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 04-Jul-2002 David Xu wrote: > while we are getting rid of Giant, current race condition between softclock() > and callout_stop() is unacceptable. the race causes two many places in source > code would be modified to fit this new behaviour, besides this, everywhere > callout_stop() is used need to hold sched_lock and do a mi_switch() and > modify td_flags is also unacceptable, this SMP race should be resolved in > kern_timeout.c. How would you resolve it while still preserving the existing semantics? Saying "this race should be resolved" doesn't explain how you would go about resolving it. It's a lot harder than it looks. -- 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