From owner-svn-src-all@FreeBSD.ORG Fri Jun 11 12:42:01 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 430FE1065670; Fri, 11 Jun 2010 12:42:01 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id 9165E8FC0C; Fri, 11 Jun 2010 12:41:56 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id o5BCfobU003624 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 11 Jun 2010 15:41:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id o5BCfnhF016755; Fri, 11 Jun 2010 15:41:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id o5BCfnPc016754; Fri, 11 Jun 2010 15:41:49 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 11 Jun 2010 15:41:49 +0300 From: Kostik Belousov To: John Baldwin Message-ID: <20100611124149.GD13238@deviant.kiev.zoral.com.ua> References: <201006101614.o5AGE5Zh099383@svn.freebsd.org> <20100611083137.GA2401@deviant.kiev.zoral.com.ua> <201006110810.40295.jhb@freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="+KJYzRxRHjYqLGl5" Content-Disposition: inline In-Reply-To: <201006110810.40295.jhb@freebsd.org> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-2.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_50, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r208988 - in head/sys: kern sys X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jun 2010 12:42:01 -0000 --+KJYzRxRHjYqLGl5 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 11, 2010 at 08:10:40AM -0400, John Baldwin wrote: > On Friday 11 June 2010 4:31:37 am Kostik Belousov wrote: > > On Thu, Jun 10, 2010 at 04:14:05PM +0000, Alexander Motin wrote: > > > Author: mav > > > Date: Thu Jun 10 16:14:05 2010 > > > New Revision: 208988 > > > URL: http://svn.freebsd.org/changeset/base/208988 > > >=20 > > > Log: > > > Store interrupt trap frame into struct thread. It allows interrupt= =20 > handler > > > to obtain both trap frame and opaque argument submitted on registrc= tion. > > > After kernel and all drivers get used to it, legacy hack can be rem= oved. > > > =20 > > > Reviewed by: jhb@ > > Just curious, why td_frame is not enough for your usage ? I believe td_= frame > > is currently set only by traps and syscalls, and copied on forks. >=20 > td_frame is not set on a nested interrupt. Thus, if you use td_frame and= get=20 > an interrupt while in a syscall, statclock() would account the time as a = user=20 > tick instead of a system tick. >=20 > Put another way, td_frame always references the user --> system > trapframe, but td_intr_frame will reference the most recent trapframe > on the stack. I mean, save old td_frame on the interrupt, and assign interrupt trap frame to td_frame. I.e., do what r208988, but replace td_intr_frame with td_frame. --+KJYzRxRHjYqLGl5 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAkwSLw0ACgkQC3+MBN1Mb4h/hQCgpq03ZshL4q58ZdboSfkPaGch qy8An0R+cwZEllslx7aZWH8YYxixfcdq =9wgW -----END PGP SIGNATURE----- --+KJYzRxRHjYqLGl5--