Messages in this thread | | | Date | Mon, 31 Jan 2000 14:52:56 -0800 | From | "Jeffrey B. Siegal" <> | Subject | Re: Strange scheduling behavoir in SMP (kernel 2.2.14) |
| |
> That's why if you have a background task and two interactive tasks on a > 2-CPU machine, you really cannot avoid the background task jumping > between CPUs unless you are willing to leave a CPU idle at times (and > that, in general, is a very bad thing to do.)
No, in general for scheduling problems, leaving a resource idle can be a useful thing to do. In specific cases it can be a bad thing.
We discussed this last year relating to disk I/O scheduling. If you have just completed an I/O on the top end of a disk, and the next queued I/O is on the bottom end of the disk, it can make sense to wait a short time to see if another request arrives for the top end before seeking all the way down to the bottom.
This situation is similar. It depends on the pattern of requests and the relative cost of a state change. As caches get bigger and faster the cost increases and it becomes more likely to be beneficial to wait. Similarly, disk transfer rates have been increasing a lot faster than seek times, making anticipatory scheduling more likely to be correct.
- 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/
| |