Re: question about scheduler related issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Mulyadi Santosa wrote:

3. Considering the rule "child should run first after fork()", is there any benchmark result showing the advantage of this decision? The commentaries said it is done to avoid COW overhead, in the case it is not cloned with CLONE_VM. But IMHO, even the child is running first, the COW overhead might still happen if it is the parent process which does a lot of memory modification..... CMIIW about my early conclusion..

Maybe because the child is likely to do an exec() syscall soon after the fork(). So, we'd better run the child, let him call exec() before doing any COW. If we run the parent before, he will follow its execution, eventually writing to pages, doing unnecessary COWs because the child is going to exec() shortly after.

This may be a reason for the "child should run first after fork()" rule. This is just a personal speculation, I'm not a kernel expert.

Sincerly,

Thomas
--
Thomas Petazzoni
thomas.petazzoni@xxxxxxxx

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux