From owner-freebsd-current@FreeBSD.ORG Wed Jul 18 02:40:07 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 40AD316A400 for ; Wed, 18 Jul 2007 02:40:07 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from basalt.tackymt.homeip.net (124x38x115x218.ap124.ftth.ucom.ne.jp [124.38.115.218]) by mx1.freebsd.org (Postfix) with ESMTP id 0F8C513C4AA for ; Wed, 18 Jul 2007 02:40:07 +0000 (UTC) (envelope-from taku@tackymt.homeip.net) Received: from localhost (localhost [127.0.0.1]) by basalt.tackymt.homeip.net (Postfix) with ESMTP id 2F2D71074A for ; Wed, 18 Jul 2007 11:19:33 +0900 (JST) Received: from basalt.tackymt.homeip.net ([127.0.0.1]) by localhost (basalt.tackymt.homeip.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 38801-04 for ; Wed, 18 Jul 2007 11:19:31 +0900 (JST) Received: from biotite (unknown [IPv6:2001:3e0:577:0:216:cfff:febc:1472]) by basalt.tackymt.homeip.net (Postfix) with ESMTP for ; Wed, 18 Jul 2007 11:19:31 +0900 (JST) Date: Wed, 18 Jul 2007 11:19:29 +0900 From: "YAMAMOTO, Taku" To: freebsd-current@freebsd.org Message-Id: <20070718111929.22bf3eb3.taku@tackymt.homeip.net> Organization: Trans New Technology, Inc. X-Mailer: Sylpheed 2.4.2 (GTK+ 2.10.13; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Wed__18_Jul_2007_11_19_29_+0900_.ymyF06wih.tOSV3" X-Virus-Scanned: amavisd-new at tackymt.homeip.net Subject: critical_exit(), td_owepreempt and SW_PREEMPT X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 18 Jul 2007 02:40:07 -0000 This is a multi-part message in MIME format. --Multipart=_Wed__18_Jul_2007_11_19_29_+0900_.ymyF06wih.tOSV3 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Greetings, I had found that critical_exit() calls mi_switch() without SW_PREEMPT when td_owepreempt is set. Should the first argument at that line be SW_INVOL|SW_PREEMPT? -- YAMAMOTO, Taku --Multipart=_Wed__18_Jul_2007_11_19_29_+0900_.ymyF06wih.tOSV3 Content-Type: text/x-diff; name="critical_exit.diff" Content-Disposition: attachment; filename="critical_exit.diff" Content-Transfer-Encoding: 7bit --- sys/kern/kern_switch.c.orig 2007-06-13 04:50:31.000000000 +0900 +++ sys/kern/kern_switch.c 2007-07-18 10:21:09.000000000 +0900 @@ -192,7 +192,7 @@ critical_exit(void) thread_lock(td); td->td_critnest--; SCHED_STAT_INC(switch_owepreempt); - mi_switch(SW_INVOL, NULL); + mi_switch(SW_INVOL|SW_PREEMPT, NULL); thread_unlock(td); } } else --Multipart=_Wed__18_Jul_2007_11_19_29_+0900_.ymyF06wih.tOSV3--