COW optimization on exec

From: sidc7
Date: Sat Mar 14 2009 - 22:58:08 EST



The Linux kernel uses the COW optimization for fork, so the processes share
the same pages, till on of the processes writes to the page. I was
wondering, if I do a fork and do an exec immediately following the fork,
will the COW optimization still be applied as it is most likely that the new
process is going to write to the shared pages? So doing a COW will not give
much benefit here, if it is done at all. Can anyone clarify if COW will be
applied in such a case, for e.g. a command shell.
--
View this message in context: http://www.nabble.com/COW-optimization-on-exec-tp22519639p22519639.html
Sent from the linux-kernel mailing list archive at Nabble.com.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/