From owner-cvs-src@FreeBSD.ORG Thu Apr 14 15:56:10 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 68DAC16A4CE; Thu, 14 Apr 2005 15:56:10 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5061943D2F; Thu, 14 Apr 2005 15:56:10 +0000 (GMT) (envelope-from imp@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j3EFuA2Y068836; Thu, 14 Apr 2005 15:56:10 GMT (envelope-from imp@repoman.freebsd.org) Received: (from imp@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j3EFuASE068835; Thu, 14 Apr 2005 15:56:10 GMT (envelope-from imp) Message-Id: <200504141556.j3EFuASE068835@repoman.freebsd.org> From: Warner Losh Date: Thu, 14 Apr 2005 15:56:10 +0000 (UTC) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/ppbus pps.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Apr 2005 15:56:10 -0000 imp 2005-04-14 15:56:10 UTC FreeBSD src repository Modified files: sys/dev/ppbus pps.c Log: In ppsintr, we needed ppsdev to get to the softc and nothing else. Save a memory dereference in the ISR by passing this in directly. Calling pps_capture is MP safe for all other operations on struct pps_state, so there's no need to aquire the lock before we do this, even from a fast ISR. Avoid dereferencing sc->ppbus until after pps_capture is called as well. These actions reduce somewhat the cache effects that cause variance in interrupt times. On an especially slow test machine (300MHz Cyrix GXm), this reduces the interrupt latency about about 10% (from 21us to 19us) and helps a little with the variance (although most of the variance seems to be caused by lots of interrupt masking). This also happens fixes one or two of bde's style issues. Revision Changes Path 1.50 +7 -11 src/sys/dev/ppbus/pps.c