"Adam J. Richter" <adam@yggdrasil.com> writes:
> Rik van Riel <riel@conectiva.com.br> writes, regarding the idea
> of having do_fork() give all of the parent's remaining time slice to
> the newly created child:
>
> >It could upset programs which use threads to handle
> >relatively IO poor things (like, waiting on disk IO in a
> >thread, like glibc does to fake async file IO).
>
> Good point.
Is it really? If a program is using thread to handle IO things,
then:
a) It's not going to create a thread for every IO! So I think
the argument is suprious anyway.
b) You _still_ want the child to run first. The child
will start the I/O and block, then switching back
to the parent. This maximises the I/O thruput without
costing you any CPU. (Reasoning: The child running
2nd will increase the latency which automatically
reduces the number of ops/second you can get).
Michael.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sun Apr 15 2001 - 21:00:22 EST