lkml.org 
[lkml]   [1996]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: X much slower in 2.0.24 than in 1.2.13
Date

Linus suggested:

> Another thing to check for: do you use gpm? There was a bugfix with VC
> selection wait-queues in 2.0.24, and maybe that fix made gpm act
> strangely. Maybe gpm _is_ adding CPU load to the system...

Nope, gpm isn't badly affected by the change. With 2.0.22 huge pasting
locked the system solid, while 2.0.24 behaves better, although it's
not completely correct: one or more bytes are lost when pasting big
chunks of data.

This patch should definitely fix console pasting. At least, it works
for me :)

*** ./drivers/char/selection.c.distrib24 Sun Nov 3 13:42:34 1996
--- ./drivers/char/selection.c Sun Nov 3 13:55:05 1996
***************
*** 289,307 ****
if (!bp || !c)
return 0;
do_unblank_screen();
- add_wait_queue(&vt->paste_wait, &wait);
do {
! current->state = TASK_INTERRUPTIBLE;
if (test_bit(TTY_THROTTLED, &tty->flags)) {
! schedule();
continue;
}
l = MIN(c, tty->ldisc.receive_room(tty));
tty->ldisc.receive_buf(tty, bp, 0, l);
c -= l;
bp += l;
} while (c);
- remove_wait_queue(&vt->paste_wait, &wait);
- current->state = TASK_RUNNING;
return 0;
}
--- 289,315 ----
if (!bp || !c)
return 0;
do_unblank_screen();
do {
! unsigned long flags; int icanon;
if (test_bit(TTY_THROTTLED, &tty->flags)) {
! interruptible_sleep_on(&vt->paste_wait);
continue;
}
+ /*
+ * If the tty is in canonical mode, `infinite' room
+ * is reported: this can lead to data loss if the paste
+ * is bigger than N_TTY_BUF_SIZE. Thus temporarily
+ * clear icanon (see n_tty_receive_room).
+ */
+ save_flags(flags);
+ icanon = tty->icanon;
+ tty->icanon = 0;
l = MIN(c, tty->ldisc.receive_room(tty));
+ tty->icanon = icanon;
+ restore_flags(flags);
tty->ldisc.receive_buf(tty, bp, 0, l);
c -= l;
bp += l;
} while (c);
return 0;
}


Regards
/alessandro
--
__ o La forza dei forti sta nel traversare le traversie con occhio sereno
_`\<, (Paperino)
__( )/( )__ alessandro.rubini@linux.it +39-382-529554


\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.027 / U:0.108 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site