Messages in this thread | | | From | devnull@spaans ... | Subject | Re: PATCH(?): linux-2.4.4-pre2: fork should run child first | Date | 14 Apr 2001 18:42:28 +1000 |
| |
"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/
| |