From: Pavel Machek <pavel@suse.cz>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andrew Morton <akpm@zip.com.au>,
kernel list <linux-kernel@vger.kernel.org>,
vojtech@suse.cz
Subject: Re: Alt-arrow console switch sometimes dropped
Date: Fri, 9 Jan 2004 19:10:09 +0100 [thread overview]
Message-ID: <20040109181009.GB191@elf.ucw.cz> (raw)
In-Reply-To: <20040108002255.0EC092C44B@lists.samba.org>
Hi!
> > Alt-arrow console switch is routinely dropped under high load. This
> > patch fixes it: alt-arrow has to start from console _we want to switch
> > to_, if switch is already pending. Please apply,
> > Pavel
>
> Sure, but a comment would be nice:
>
> /* Currently switching? Queue this next switch relative to
> > that. */
Oops, there was exactly the same problem in "fn_dec_console". Here's
incremental patch to add the comment and fix fn_dec_console,
too. I hope it is applicable.
Pavel
--- tmp/linux/drivers/char/keyboard.c 2004-01-09 19:04:43.000000000 +0100
+++ linux/drivers/char/keyboard.c 2004-01-09 18:59:43.000000000 +0100
@@ -515,8 +515,13 @@
static void fn_dec_console(struct vc_data *vc, struct pt_regs *regs)
{
int i;
+ int cur = fg_console;
+
+ /* Currently switching? Queue this next switch relative to that. */
+ if (want_console != -1)
+ cur = want_console;
- for (i = fg_console-1; i != fg_console; i--) {
+ for (i = cur-1; i != cur; i--) {
if (i == -1)
i = MAX_NR_CONSOLES-1;
if (vc_cons_allocated(i))
@@ -530,6 +535,7 @@
int i;
int cur = fg_console;
+ /* Currently switching? Queue this next switch relative to that. */
if (want_console != -1)
cur = want_console;
--
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]
prev parent reply other threads:[~2004-01-09 18:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-03 13:37 Alt-arrow console switch sometimes dropped Pavel Machek
2004-01-07 23:55 ` Rusty Russell
2004-01-09 18:10 ` Pavel Machek [this message]
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=20040109181009.GB191@elf.ucw.cz \
--to=pavel@suse.cz \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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