From owner-freebsd-current@FreeBSD.ORG Fri Feb 22 17:29:50 2008 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7E7A816A402; Fri, 22 Feb 2008 17:29:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from relay03.kiev.sovam.com (relay03.kiev.sovam.com [62.64.120.201]) by mx1.freebsd.org (Postfix) with ESMTP id 2483A13C44B; Fri, 22 Feb 2008 17:29:50 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from [212.82.216.226] (helo=skuns.kiev.zoral.com.ua) by relay03.kiev.sovam.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.67) (envelope-from ) id 1JSbiS-000MKG-9V; Fri, 22 Feb 2008 19:29:48 +0200 Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by skuns.kiev.zoral.com.ua (8.14.1/8.14.1) with ESMTP id m1MHTAKx071245 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 22 Feb 2008 19:29:10 +0200 (EET) (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.2/8.14.2) with ESMTP id m1MHTWhP095304; Fri, 22 Feb 2008 19:29:32 +0200 (EET) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.2/8.14.2/Submit) id m1MHTUev095302; Fri, 22 Feb 2008 19:29:30 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 22 Feb 2008 19:29:30 +0200 From: Kostik Belousov To: Alexander Nedotsukov Message-ID: <20080222172930.GZ57756@deviant.kiev.zoral.com.ua> References: <4796356D.9080809@gmail.com> <20080123051648.GV57756@deviant.kiev.zoral.com.ua> <479796E1.4000500@gmail.com> <1201118159.38742.17.camel@shumai.marcuscom.com> <20080123211149.GA57756@deviant.kiev.zoral.com.ua> <1201123933.62127.9.camel@shumai.marcuscom.com> <20080124124213.GD57756@deviant.kiev.zoral.com.ua> <72E58ECA-D743-4D5E-9222-7129104E4BAC@bbnest.net> <20080221154714.GS57756@deviant.kiev.zoral.com.ua> <20CD87E3-27BC-4789-A51F-BBFDB3258B47@bbnest.net> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="/CLVNuQCc5gNsroI" Content-Disposition: inline In-Reply-To: <20CD87E3-27BC-4789-A51F-BBFDB3258B47@bbnest.net> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: ClamAV version 0.91.2, clamav-milter version 0.91.2 on skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-4.4 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on skuns.kiev.zoral.com.ua X-Scanner-Signature: 3f6c5f504711b4b2e39067d20b60c9d6 X-DrWeb-checked: yes X-SpamTest-Envelope-From: kostikbel@gmail.com X-SpamTest-Group-ID: 00000000 X-SpamTest-Info: Profiles 2291 [Feb 22 2008] X-SpamTest-Info: helo_type=3 X-SpamTest-Info: {received from trusted relay: not dialup} X-SpamTest-Method: none X-SpamTest-Method: Local Lists X-SpamTest-Rate: 0 X-SpamTest-Status: Not detected X-SpamTest-Status-Extended: not_detected X-SpamTest-Version: SMTP-Filter Version 3.0.0 [0255], KAS30/Release Cc: yokota@freebsd.org, FreeBSD Current , Joe Marcus Marcus Clarke Subject: Re: page fault panic in scioctl and console-kit-daemon 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: Fri, 22 Feb 2008 17:29:50 -0000 --/CLVNuQCc5gNsroI Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Feb 23, 2008 at 01:01:59AM +0900, Alexander Nedotsukov wrote: >=20 > On 22.02.2008, at 0:47, Kostik Belousov wrote: >=20 > >On Thu, Feb 21, 2008 at 09:26:16AM +0900, Alexander Nedotsukov wrote: > >>Hi, > >> > >>May I ask to revisit this issue? To me ENXIO is not semantically > >>correct in this particular case. It also turns out that doing > >>workaround in userspace may not be that good as we used to think. I > >>propose is to fix VT_WAITACTIVE so it simply wait for bound device > >>activation. For my understanding this change should not have any > >>impact on existing code. I also removed really strange console =20 > >>cleanup > >>bit sticked in a long time ago (see ioctl() part). > >>It will be nice to see this patch > > > > > >>(successfully tested by our affected users) committed to all =20 > >>branches. > >> > >>Thanks, > >>Alexander. > > > >I mostly agree with the patch, given it is tested. > > > >The first (not important) note is that change of the wait channel from > >the address of the private structure to the address of the cdev could > >cause more spurious wakeups then before. I expect you usermode code to > >deal with it properly. > Do you know any potential wakeup()s around the kernel? I did not see =20 > any spurious wakeups myself nor user reported it so far. However they =20 > are not welcome so if it considered to be unsafe we can use address of = =20 > cdev pointer (&SC_DEV()) which is private to syscons. Nothing prevents any code in the the kernel from performing wakeup on any wait channel. Due to tradition, wait channel is usually an address of some data structure that is owned by the code performing wakeup. I do not know of any other code that uses cdev address as wait channel, The issue of spurious wakeup is not very important per se. I think more essential for the correct operation is the fact that when the user-mode code is executed, console may already be inactive (again). This is quite similar to the unintended wakeups. Does the code handle this ? If yes, I think it shall handle the wakeups too without any additional actions. I underline that this is not an objection against the patch. --/CLVNuQCc5gNsroI Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAke/BnoACgkQC3+MBN1Mb4jzZACcCTZFQLD6WbdRJJvBiJ6EUMQO XckAoLnJNLyW2hm9gsur4QqHIX05btMA =6GpF -----END PGP SIGNATURE----- --/CLVNuQCc5gNsroI--