lkml.org 
[lkml]   [1996]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Dumping /dev/zero to the console
Date
Systemkennung Linux:
> The problem is *not* dumping /dev/zero to the console but the bs=1024k
> argument to dd. Therefore the kernel will print more than one million
> chars with one single syscall to the screen. The Linux kernel isn't
> preemptible and therefore the write operation to the console will be
> completed - no matter how long it takes. Fixing is trivial, something
> like the following untested patch to console.c should do the job.
>
> disable_bh(CONSOLE_BH);
> while (!tty->stopped && count) {
> + if(need_resched)
> + schedule();
> enable_bh(CONSOLE_BH);
> c = from_user ? get_user(buf) : *buf;
> buf++; n++; count--;

It must be slightly less trivial :) - the above patch causes some
problems. The console driver seems to hang sometimes (no more
output, and can't switch consoles) - pressing Scroll Lock twice
wakes it up again. Also, I got "Aiee scheduling in interrupt"
(with EIP value in con_write) once.

Marek


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