From owner-freebsd-arch@FreeBSD.ORG Wed Sep 12 20:32:51 2007 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D99B16A420 for ; Wed, 12 Sep 2007 20:32:51 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from creme-brulee.marcuscom.com (marcuscom-pt.tunnel.tserv1.fmt.ipv6.he.net [IPv6:2001:470:1f00:ffff::1279]) by mx1.freebsd.org (Postfix) with ESMTP id DDD9913C474 for ; Wed, 12 Sep 2007 20:32:50 +0000 (UTC) (envelope-from marcus@FreeBSD.org) Received: from [IPv6:2001:470:1f00:2464::4] (shumai.marcuscom.com [IPv6:2001:470:1f00:2464::4]) by creme-brulee.marcuscom.com (8.14.1/8.14.1) with ESMTP id l8CKXPES057901; Wed, 12 Sep 2007 16:33:26 -0400 (EDT) (envelope-from marcus@FreeBSD.org) From: Joe Marcus Clarke To: Bruce Evans In-Reply-To: <20070902131910.H46281@delplex.bde.org> References: <1188600721.1255.11.camel@shumai.marcuscom.com> <20070901112600.GA33832@stack.nl> <1188660782.41727.5.camel@shumai.marcuscom.com> <20070901224025.GA97796@stack.nl> <20070902131910.H46281@delplex.bde.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=-8zv3kekHV5lojjJdjkLb" Organization: FreeBSD, Inc. Date: Wed, 12 Sep 2007 16:32:44 -0400 Message-Id: <1189629164.80084.81.camel@shumai.marcuscom.com> Mime-Version: 1.0 X-Mailer: Evolution 2.10.3 FreeBSD GNOME Team Port X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,NO_RELAYS autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on creme-brulee.marcuscom.com Cc: Jilles Tjoelker , freebsd-arch@FreeBSD.org Subject: Re: Understanding interrupted system calls X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Sep 2007 20:32:51 -0000 --=-8zv3kekHV5lojjJdjkLb Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun, 2007-09-02 at 14:17 +1000, Bruce Evans wrote: > >From Jilles' previous reply: >=20 > >>> The problem seems to be the following code in > >>> src/sys/dev/syscons/syscons.c, in case VT_WAITACTIVE in scioctl(): > >>>=20 > >>> while ((error=3Dtsleep(&scp->smode, PZERO|PCATCH, > >>> "waitvt", 0)) =3D=3D ERESTART) ; > >>>=20 > >>> If a signal is caught and system call restart is enabled for that > >>> signal, this makes it spin in a tight loop, waiting in vain for the > >>> signal to go away. The idea of ERESTART is that the syscall function > >>> returns it and then the signal handler is entered. If and when the > >>> signal handler returns, it will return to the system call instruction= , > >>> restarting it (perhaps this is optimized to avoid the switch to userl= and > >>> and back). With EINTR, the signal handler would return to directly > >>> after the system call instruction. > >>>=20 > >>> The fixed version would then be > >>>=20 > >>> error =3D tsleep(&scp->smode, PZERO|PCATCH, "waitvt", 0); >=20 > I think this is right. The kernel should never loop on ERESTART like thi= s. > Please fix the remaining style bug in it (missing spaces around binary > operator). Bruce, I didn't know if you saw my fix, if it needs more work, or if you're going to commit it? I'd really like to get this fixed before 7.0. Should I open a PR to track it? Thanks. http://www.marcuscom.com/downloads/syscons.c.diff http://www.marcuscom.com/downloads/pcvt_ext.c (-STABLE only) Joe --=20 Joe Marcus Clarke FreeBSD GNOME Team :: gnome@FreeBSD.org FreeNode / #freebsd-gnome http://www.FreeBSD.org/gnome --=-8zv3kekHV5lojjJdjkLb Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQBG6Ezpb2iPiv4Uz4cRAh0rAJ4kMI4f+FZQ2rcFMlHeZPDU5cLLyQCcCvwf ePZ8O9KB60ZTp7RsnnWE5A4= =iyHG -----END PGP SIGNATURE----- --=-8zv3kekHV5lojjJdjkLb-- From owner-freebsd-arch@FreeBSD.ORG Fri Sep 14 03:39:29 2007 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1394716A41A for ; Fri, 14 Sep 2007 03:39:29 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from mojo.ru (mojo.ru [84.252.152.63]) by mx1.freebsd.org (Postfix) with ESMTP id 85F3B13C442 for ; Fri, 14 Sep 2007 03:39:28 +0000 (UTC) (envelope-from cnst@FreeBSD.org) Received: from [192.168.0.16] (nc-76-4-28-21.dhcp.embarqhsd.net [76.4.28.21]) (authenticated bits=0) by mojo.ru (8.12.11.20060308/8.12.10) with ESMTP id l8E3CUVe022401 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 14 Sep 2007 07:12:48 +0400 Message-ID: <46E9FC0C.70607@FreeBSD.org> Date: Thu, 13 Sep 2007 23:12:12 -0400 From: "Constantine A. Murenin" Organization: Google Summer of Code 2007 Student @ The FreeBSD Project User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041217 X-Accept-Language: en-gb, en-gb-oed, en, en-us, ru, ru-ru, ru-su MIME-Version: 1.0 To: freebsd-arch@FreeBSD.org, freebsd-current@FreeBSD.org, freebsd-hackers@FreeBSD.org References: <200709132302.l8DN2Tv5076033@repoman.freebsd.org> In-Reply-To: <200709132302.l8DN2Tv5076033@repoman.freebsd.org> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Cc: Alexander Leidinger , Shteryana Shopova , "Constantine A. Murenin" Subject: GSoC2007: cnst-sensors.2007-09-13.patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2007 03:39:29 -0000 Dear freebsd-{arch,current,hackers}@, On this 256th day of 2007, it is my great pleasure to announce the completion of my GSoC2007 project on porting the sysctl hardware sensors framework from OpenBSD to FreeBSD. All of the things that were planned to be ported from OpenBSD base system to FreeBSD have now been ported. The userland part of the framework is entirely source-code compatible with OpenBSD. For example, you can take OpenBSD's stock sensorsd(8), and it'll compile and work on FreeBSD with no modifications. The framework is quite self-contained, so I think it is a safe bet to at least try to get it into the tree even at this point, when the code freeze is taking place in preparation for RELENG_7 branching. Therefore, I hereby request that this patch be considered for immediate inclusion into FreeBSD's main CVS repository. The complete CVS patch is available from: http://mojo.ru/us/GSoC2007.cnst-sensors.2007-09-13.patch.gz For backup purposes, a copy of this CVS patch is also available in my perforce branch, although it has tainted $P4$ tags in individual files, so use perforce as a last resort: http://p4web.freebsd.org//depot/projects/soc2007/cnst-sensors/cnst-sensors.2007-09-13.patch Exact details on how to apply and test the patch are available in my LiveJournal, along with certain other comments: http://cnst.livejournal.com/38421.html#directions If you have an Intel Core 2 processor, or a Winbond or ITE Tech Super I/O chip on your board, then please test and report back on how your tests went. Best regards, Constantine Aleksandrovich Murenin, Google Summer of Code 2007 Student @ The FreeBSD Project. ;) On 13/09/2007 19:02, Constantine A. Murenin wrote: > http://perforce.freebsd.org/chv.cgi?CH=126384 > > Change 126384 by cnst@dale on 2007/09/13 23:01:55 > > On this 256th day of 2007, it is my great pleasure to > present a feature-complete port of the hardware sensors > framework from OpenBSD to FreeBSD. > > Below is a complete `cvs diff` of cnst-sensors GSoC2007 > project as of 2007-256. > > It includes the following components, listed below in > the very same order as they are appearing in this diff: > > * sample configuration file for sensorsd > * rc(8) script and glue code for sensorsd(8) > * sysctl(3) doc fixes for CTL_HW tree > * sysctl(3) documentation for hardware sensors > * sysctl(8) documentation for hardware sensors > * assorted KNF and bug-fixes for sysctl(8) > * support for the sensor structure for sysctl(8) > * coretemp(4) documentation > * it(4) documentation > * lm(4) documentation > * rc.conf(5) documentation for starting sensorsd(8) > * sensor_attach(9) et al documentation > * coretemp(4) conversion to the hw.sensors framework > * it(4) isa driver ported from OpenBSD > * lm(4) isa driver ported from OpenBSD > * /sys/kern/kern_sensors.c > o sensor_attach(9) API for drivers to register ksensors > o sensor_task_register(9) API for the update task > o sysctl(3) glue code > o hw.sensors shadow tree for sysctl(8) internal magic > * assorted KNF and bug-fixes for /sys/kern/kern_sysctl.c > * it(4) module for testing sensor_attach/detach et al > * lm(4) module for testing sensor_attach/detach et al > * > * assorted bug-fixes and HW_SENSORS definition for > * sensors display for systat(1), including all documentation > * sensorsd(8) and all applicable documentation > > The userland part of the framework is entirely source-code > compatible with OpenBSD 4.1, 4.2 and -current as of today. > > All sensor readings can be viewed with `sysctl hw.sensors`, > monitored in semi-realtime with `systat -sensors` and also > logged with `sensorsd`. Third-party tools, for example a > plug-in for nagios, are also available. A separate patch > for ports/sysutils/symon will be provided upon request. > > Submitted by: cnst@FreeBSD.org (Constantine A. Murenin) > Obtained from: generated by sensors.cvsdiff.sh from > //depot/projects/soc2007/cnst-sensors/ > Sponsored by: Google Summer of Code 2007 > > > Obtained from: http://mojo.ru/us/GSoC2007.cnst-sensors.2007-09-13.patch.gz > > Details at: http://cnst.livejournal.com/38421.html > > Affected files ... > > .. //depot/projects/soc2007/cnst-sensors/cnst-sensors.2007-09-13.patch#1 add > > Differences ... > From owner-freebsd-arch@FreeBSD.ORG Fri Sep 14 07:00:10 2007 Return-Path: Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 129DC16A417 for ; Fri, 14 Sep 2007 07:00:10 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (tim.des.no [194.63.250.121]) by mx1.freebsd.org (Postfix) with ESMTP id C926013C49D for ; Fri, 14 Sep 2007 07:00:09 +0000 (UTC) (envelope-from des@des.no) Received: from tim.des.no (localhost [127.0.0.1]) by spam.des.no (Postfix) with ESMTP id 9340D2097; Fri, 14 Sep 2007 08:44:59 +0200 (CEST) X-Spam-Tests: AWL X-Spam-Learn: disabled X-Spam-Score: 0.0/3.0 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on tim.des.no Received: from ds4.des.no (des.no [80.203.243.180]) by smtp.des.no (Postfix) with ESMTP id 13E0E2096; Fri, 14 Sep 2007 08:44:59 +0200 (CEST) Received: by ds4.des.no (Postfix, from userid 1001) id EF2628447E; Fri, 14 Sep 2007 08:44:58 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: "Constantine A. Murenin" References: <200709132302.l8DN2Tv5076033@repoman.freebsd.org> <46E9FC0C.70607@FreeBSD.org> Date: Fri, 14 Sep 2007 08:44:58 +0200 In-Reply-To: <46E9FC0C.70607@FreeBSD.org> (Constantine A. Murenin's message of "Thu\, 13 Sep 2007 23\:12\:12 -0400") Message-ID: <86ir6deoet.fsf@ds4.des.no> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-hackers@FreeBSD.org, Alexander Leidinger , freebsd-current@FreeBSD.org, Shteryana Shopova , freebsd-arch@FreeBSD.org Subject: Re: GSoC2007: cnst-sensors.2007-09-13.patch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 Sep 2007 07:00:10 -0000 "Constantine A. Murenin" writes: > Therefore, I hereby request that this patch be considered for > immediate inclusion into FreeBSD's main CVS repository. Trouble is, we're in code freeze... you'll have to ask re@. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no