public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dtor_core@ameritech.net>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, greg@kroah.com, vojtech@suse.cz
Subject: Re: [RFC] Changing SysRq - show registers handling
Date: Thu, 3 Jun 2004 02:27:22 -0500	[thread overview]
Message-ID: <200406030227.22178.dtor_core@ameritech.net> (raw)
In-Reply-To: <20040603001804.750b7fa5.akpm@osdl.org>

On Thursday 03 June 2004 02:18 am, Andrew Morton wrote:
> Dmitry Torokhov <dtor_core@ameritech.net> wrote:
> >
> > > do_IRQ(...)
> >  > {
> >  > 	...
> >  > 	struct pt_regs **cpu_regs_slot = __get_cpu_var(global_irq_regs);
> >  > 	struct pt_regs *save = *cpu_regs_slot;
> >  > 	*cpu_regs_slot = &regs;
> >  > 	...
> >  > 	*cpu_regs_slot = save;
> >  > }
> >  > 
> >  > And to teach the sysrq code to grab *__get_cpu_var(global_irq_regs).
> > 
> >  Ok, so by making it a tad slower you can keep the old semantics - printing
> >  registers right when keyboard interrupt is processed instead of waiting till
> >  the next one arrives.
> > 
> >  Hmm... the path is pretty hot, I am not sure what is best.
> 
> Well bear in mind that we can then rip all the pt_regs passing out from
> everywhere, so as long as you edit every IRQ handler in the kernel it's a
> net win ;)

Will you let me? :) USB and serio will at least not mess anyone else...

> 
> I _think_ it'll work - as long as all architectures go through a common
> dispatch function like do_IRQ(), which surely they do.  The above code
> could be an arch-neutral inline actually.
> 
> I'm not sure what's best really.  But something this general is more
> attractive than something which is purely for sysrs-T.
> 

I don't like the requirement of SysRq request processing being in hard
interrupt handler - that excludes uinput-generated events and precludes
moving keyboard handling to a tasklet for example.

-- 
Dmitry

  reply	other threads:[~2004-06-03  7:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-03  6:34 [RFC] Changing SysRq - show registers handling Dmitry Torokhov
2004-06-03  6:53 ` Andrew Morton
2004-06-03  7:08   ` Dmitry Torokhov
2004-06-03  7:18     ` Andrew Morton
2004-06-03  7:27       ` Dmitry Torokhov [this message]
2004-06-03  7:39         ` Andrew Morton
2004-06-03  7:44         ` Oliver Neukum
2004-06-03 21:06           ` Theodore Ts'o
2004-06-03 22:21             ` Keith Owens
     [not found] <fa.jjf8osn.670mbt@ifi.uio.no>
2004-06-03  7:03 ` Andy Lutomirski
2004-06-03  7:15   ` Dmitry Torokhov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200406030227.22178.dtor_core@ameritech.net \
    --to=dtor_core@ameritech.net \
    --cc=akpm@osdl.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vojtech@suse.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox