From owner-p4-projects@FreeBSD.ORG Thu Jul 29 20:38:08 2004 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 6562A16A4CE; Thu, 29 Jul 2004 20:38:08 +0000 (GMT) Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 233A116A4CE; Thu, 29 Jul 2004 20:38:08 +0000 (GMT) Received: from mail.vicor-nb.com (bigwoop.vicor-nb.com [208.206.78.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id DEB0243D31; Thu, 29 Jul 2004 20:38:07 +0000 (GMT) (envelope-from julian@elischer.org) Received: from elischer.org (julian.vicor-nb.com [208.206.78.97]) by mail.vicor-nb.com (Postfix) with ESMTP id D15847A489; Thu, 29 Jul 2004 13:38:07 -0700 (PDT) Message-ID: <4109602F.9080108@elischer.org> Date: Thu, 29 Jul 2004 13:38:07 -0700 From: Julian Elischer User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.3.1) Gecko/20030516 X-Accept-Language: en, hu MIME-Version: 1.0 To: John Baldwin References: <200407292035.i6TKZqh2054795@repoman.freebsd.org> In-Reply-To: <200407292035.i6TKZqh2054795@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit cc: Perforce Change Reviews Subject: Re: PERFORCE change 58484 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jul 2004 20:38:09 -0000 John Baldwin wrote: >http://perforce.freebsd.org/chv.cgi?CH=58484 > >Change 58484 by jhb@jhb_slimer on 2004/07/29 20:35:13 > > Try to optimize intr_disable/restore by avoiding cli/sti like the > plague. > shouldn't one of these tests be reversed? > >Affected files ... > >.. //depot/projects/smpng/sys/i386/include/cpufunc.h#28 edit > >Differences ... > >==== //depot/projects/smpng/sys/i386/include/cpufunc.h#28 (text+ko) ==== > >@@ -611,14 +611,16 @@ > register_t eflags; > > eflags = read_eflags(); >- disable_intr(); >+ if (eflags & PSL_I) >+ disable_intr(); > return (eflags); > } > > static __inline void > intr_restore(register_t eflags) > { >- write_eflags(eflags); >+ if (eflags & PSL_I) >+ enable_intr(); > } > > #else /* !(__GNUC__ || __INTEL_COMPILER) */ > >