Date: Mon, 17 Mar 2008 15:18:58 +0200 From: Kostik Belousov <kostikbel@gmail.com> To: Alexander Nedotsukov <bland@bbnest.net> Cc: yokota@freebsd.org, FreeBSD Current <freebsd-current@freebsd.org>, Joe Marcus Marcus Clarke <marcus@freebsd.org> Subject: Re: page fault panic in scioctl and console-kit-daemon Message-ID: <20080317131858.GV10374@deviant.kiev.zoral.com.ua> In-Reply-To: <641CAF57-F235-4F0D-A120-2B58F0B13861@bbnest.net> References: <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> <20080222172930.GZ57756@deviant.kiev.zoral.com.ua> <641CAF57-F235-4F0D-A120-2B58F0B13861@bbnest.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--ucW7QTJbHsz5ya91 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Mar 17, 2008 at 10:02:39PM +0900, Alexander Nedotsukov wrote: > Better late than never :-) I am back. I understand your concerns and =20 > can assure that use-mode code will do right. I changed wchan address =20 > from system wide cdev pointer to syscons private address. What else =20 > need to be done to get this checked in and/or will you do that or I =20 > can proceed myself? Just commit it. If needed, add Approved by: kib. >=20 >=20 >=20 > Thanks, > Alexander. >=20 > On 23.02.2008, at 2:29, Kostik Belousov wrote: >=20 > >On Sat, Feb 23, 2008 at 01:01:59AM +0900, Alexander Nedotsukov wrote: > >> > >>On 22.02.2008, at 0:47, Kostik Belousov wrote: > >> > >>>On Thu, Feb 21, 2008 at 09:26:16AM +0900, Alexander Nedotsukov =20 > >>>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 > >>>>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 > >>>>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 =20 > >>>from > >>>the address of the private structure to the address of the cdev =20 > >>>could > >>>cause more spurious wakeups then before. I expect you usermode =20 > >>>code to > >>>deal with it properly. > >>Do you know any potential wakeup()s around the kernel? I did not see > >>any spurious wakeups myself nor user reported it so far. However they > >>are not welcome so if it considered to be unsafe we can use address =20 > >>of > >>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 =20 > >channel, > > > >The issue of spurious wakeup is not very important per se. I think =20 > >more > >essential for the correct operation is the fact that when the user-=20 > >mode > >code is executed, console may already be inactive (again). This is =20 > >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. >=20 --ucW7QTJbHsz5ya91 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (FreeBSD) iEYEARECAAYFAkfeb8EACgkQC3+MBN1Mb4h/ngCfUIjHwg5LNzCMagSL88Wfp/TS VTEAoJecqpMnByY/2sC9YhCQ3R9aWFp8 =BCIp -----END PGP SIGNATURE----- --ucW7QTJbHsz5ya91--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080317131858.GV10374>