[lkml]   [1996]   [Jul]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Dumping /dev/zero to the console

> Well...I also tried the dd trick on my humble little 486-33, and other
> than eat about 85% of the CPU time, slowing things down even more,
> nothing terrible happened.

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.

while (!tty->stopped && count) {
+ if(need_resched)
+ schedule();
c = from_user ? get_user(buf) : *buf;
buf++; n++; count--;


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