Re: COW optimization on exec

From: sidc7
Date: Sun Mar 15 2009 - 02:20:59 EST



> exec throws out all those pages, so go away without ever having been
> copied. However it still costs memory CPU time TLB flushes etc in order
> to set up the COW optimisation in the first place, so if you are doing
> fork/exec, then I think vfork is the better option.


Thanks once again, if I do something like creating an array spanning over
multiple pages, and then do a fork and in the child or the parent, write to
the array elements, this should result in an actual cow, where the OS will
actually do a copy of the pages as well in addition to the overhead required
for setting up COW in the first place?

Thanks


--
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/



--
View this message in context: http://www.nabble.com/COW-optimization-on-exec-tp22519639p22520422.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/