[haiku-development] Re: Emergency keyboard shortcut handler
- From: Jan Klötzke <jan.kloetzke@xxxxxxxxxx>
- To: haiku-development@xxxxxxxxxxxxx
- Date: Mon, 30 Jun 2008 22:07:26 +0200
"Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx> wrote:
> Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> > On 2008-06-28 at 18:39:45 [+0200], André Braga <meianoite@xxxxxxxxx>
> >
> > wrote:
> > > On Sun, Aug 31, 2008 at 10:20, Michael Lotz <mmlr@xxxxxxxx> wrote:
> > > > Is there any reason why this couldn't be moved into the
> > > > input_server?
> > >
> > > Of course there is! He wanted you guys to review his patch and see
> > > if
> > > you'd be interested in it at all :) So he implemented it in a way
> > > that
> > > could be easily disabled and debugged before mucking with the
> > > bowels
> > > of input_server :)
> >
> > I would settle for the more obvious reason that having this
> > functionality
> > in the input server makes it rely on a working input server, while in
> > the
> > kernel it will always work. Sounds like a reasonable approach for an
> > "emergency" feature.
Nothing to add here. :-)
> That depends, actually - if the input_server just locked up for some
> reason, it would still work, but if it was closed, it will close the
> devices with it, and therefore, the emergency keyboard shortcuts won't
> work.
Good point. That's certainly a problem with the chosen approach.
> Also, it doesn't really sound like a good idea to make halting the
> other CPUs optional; the KDL commands usually don't care about locking
> (as they don't have to, and waiting wouldn't help either), and
> executing them while some other threads might be busy on the same
> structures is definitely problematic -- an emergency feature that
> crashes doesn't really help.
While I do agree in general I made the halting optional only for the "show
backtraces on all CPU's" feature. I thought it would lock up on SMP systems
because the "sc" KDL command is broadcasted to all CPU's via ICI
(call_all_cpus()) and would then again try to lock all CPU's also via ICI's.
So all CPU's try to lock each other. But quite frankly I'm not sure anymore
that there is really a problem after digging in the code. Unfortunately I
have no SMP system to test...
> Apart from that, I think it looks good. Of course, one could move it
> into the input_server, but then you couldn't execute any KDL commands
> either - but maybe a "listarea" is already helpful as well... :-)
Access to the KDL commands was one of the reasons why I implemented it in the
kernel. But maybe it would be an option to just use the emergency module as a
well defined, tight interface to execute some predefined KDL commands from
user space and use this from the input server.
pro: would work with any input driver, less code duplication
con: relies on working input server
Any suggestions? Anyway, thanks for all comments so far. :-)
/Jan
- References:
- [haiku-development] Re: Emergency keyboard shortcut handler
- From: Axel Dörfler
Other related posts:
- » [haiku-development] Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- » [haiku-development] Re: Emergency keyboard shortcut handler
- [haiku-development] Re: Emergency keyboard shortcut handler
- From: Axel Dörfler