Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Konstantin Belousov
On Fri, Mar 23, 2018 at 01:21:43AM +1100, Bruce Evans wrote: > I don't like having a whole task for this. The whole thing is just a > hack to work around some the upper layers of the tty driver and some > lower layers not having any input [escape] sequences to control the > kernel. Only the sysco

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Warner Losh
On Thu, Mar 22, 2018 at 5:42 AM, Konstantin Belousov wrote: > On Thu, Mar 22, 2018 at 05:50:57PM +1100, Bruce Evans wrote: > > On Wed, 21 Mar 2018, Warner Losh wrote: > > > > > On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov < > kostik...@gmail.com> > > > wrote: > > >> ... > > >> Are you say

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Bruce Evans
On Thu, 22 Mar 2018, Konstantin Belousov wrote: On Thu, Mar 22, 2018 at 05:50:57PM +1100, Bruce Evans wrote: On Wed, 21 Mar 2018, Warner Losh wrote: On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov wrote: ... Are you saying that fast interrupt handlers call shutdown_nice() ? This is th

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Konstantin Belousov
On Thu, Mar 22, 2018 at 05:50:57PM +1100, Bruce Evans wrote: > On Wed, 21 Mar 2018, Warner Losh wrote: > > > On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov > > wrote: > >> ... > >> Are you saying that fast interrupt handlers call shutdown_nice() ? This > >> is the quite serious bug on its

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-22 Thread Bruce Evans
On Wed, 21 Mar 2018, Warner Losh wrote: On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov wrote: ... Are you saying that fast interrupt handlers call shutdown_nice() ? This is the quite serious bug on its own. To fix it, shutdown_nice() should use a fast taskqueue to schedule the task whi

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Bruce Evans
On Wed, 21 Mar 2018, Warner Losh wrote: On Wed, Mar 21, 2018 at 11:53 AM, Bruce Evans wrote: On Wed, 21 Mar 2018, Warner Losh wrote: Log: Unlock giant when calling shutdown_nice() This breaks the driver. Giant is syscons' driver lock, and also the interrupt handler lock for at least the

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Bruce Evans
On Wed, 21 Mar 2018, Konstantin Belousov wrote: On Thu, Mar 22, 2018 at 04:53:22AM +1100, Bruce Evans wrote: Serial console drivers with fast interrupt handlers have much more broken locking for ddb special keys. It is invalid to either drop locks or call the "any" function from a fast interru

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Warner Losh
On Wed, Mar 21, 2018 at 2:27 PM, Konstantin Belousov wrote: > On Thu, Mar 22, 2018 at 04:53:22AM +1100, Bruce Evans wrote: > > Serial console drivers with fast interrupt handlers have much more > > broken locking for ddb special keys. It is invalid to either drop locks > > or call the "any" func

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Warner Losh
On Wed, Mar 21, 2018 at 11:53 AM, Bruce Evans wrote: > On Wed, 21 Mar 2018, Warner Losh wrote: > > Log: >> Unlock giant when calling shutdown_nice() >> > > This breaks the driver. Giant is syscons' driver lock, and also the > interrupt handler lock for at least the atkbd keyboard driver, so vt

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Konstantin Belousov
On Thu, Mar 22, 2018 at 04:53:22AM +1100, Bruce Evans wrote: > Serial console drivers with fast interrupt handlers have much more > broken locking for ddb special keys. It is invalid to either drop locks > or call the "any" function from a fast interrupt handler, but buggy > serial console drivers

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Bruce Evans
On Thu, 22 Mar 2018, Bruce Evans wrote: On Wed, 21 Mar 2018, Warner Losh wrote: Log: Unlock giant when calling shutdown_nice() ... This breaks the driver. Giant is syscons' driver lock, and also the interrupt handler lock for at least the atkbd keyboard driver, so vt sometimes holds the loc

Re: svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Bruce Evans
On Wed, 21 Mar 2018, Warner Losh wrote: Log: Unlock giant when calling shutdown_nice() This breaks the driver. Giant is syscons' driver lock, and also the interrupt handler lock for at least the atkbd keyboard driver, so vt sometimes holds the lock for. vt has to sprinkle lots of Giant lock

svn commit: r331298 - head/sys/dev/syscons

2018-03-21 Thread Warner Losh
Author: imp Date: Wed Mar 21 14:47:12 2018 New Revision: 331298 URL: https://svnweb.freebsd.org/changeset/base/331298 Log: Unlock giant when calling shutdown_nice() Modified: head/sys/dev/syscons/syscons.c Modified: head/sys/dev/syscons/syscons.c =