Messages in this thread | | | From | (Alan Cox) | Subject | Re: scrolling eats too much cpu (2) | Date | Fri, 11 Dec 1998 15:59:51 +0000 (GMT) |
| |
> So, when a program writes large blocks to graphical console (e.g. > telnet or cat), scheduling does not occur quite a long time. > > I tried the following hack, and it helped in -opost case. But I know > it's not correct solution. Any ideas?
There is a flag the scheduler keeps on the current task you can test to see if it thinks you should by now have given up the CPU. So providing you put it somewhere that sleeping is ok (eg by the copy from user) then
if(current->need_resched) schedule();
should do the trick
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |