Re: Copy-on-Write

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

 



What kernel version did you get this code?

I looked at 2.6.22.1 (my kernel version) and found this piece of code:

/*
 * wake_up_new_task - wake up a newly created task for the first time.
  *
 * This function will do some initial scheduler statistics housekeeping
 * that must be done for every newly created context, then puts the task
 * on the runqueue and wakes it.
 */
void fastcall wake_up_new_task(struct task_struct *p, unsigned long clone_flags)
 {
       ......
       if (likely(cpu == this_cpu)) {
                if (!(clone_flags & CLONE_VM)) {
                        /*
                         * The VM isn't cloned, so we're in a good position to
                          * do child-runs-first in anticipation of an exec. This
                         * usually avoids a lot of COW overhead.
                         */
                        if (unlikely(!current->array))
                                 __activate_task(p, rq);
                        else {
                                ....
                        }
                        set_need_resched();
                } else
                         /* Run child last */
                        __activate_task(p, rq);

The variable ...sysctl_sched_child_runs
_first it's not present, such as /sys relationship..... Perhaps was
removed from oldest version, anybody know about that?

Cheers;

Renê
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" 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.linux-learn.org/faqs

[Index of Archives]     [Audio]     [Hams]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Fedora Users]

  Powered by Linux