lkml.org 
[lkml]   [2000]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Subject2.3.51: this doesn't look right
From
Date
The following was added to exit.c in 2.3.51:

+ /*
+ * Potentially available timeslices are retrieved
+ * here - this way the parent does not get penalized
+ * for creating too many processes.
+ *
+ * (this cannot be used to artificially 'generate'
+ * timeslices, because any timeslice recovered here
+ * was given away by the parent in the first place.)
+ */
+ current->counter += p->counter;
+ if (current->counter > current->priority)
+ current->counter = current->priority;

Because of counter recalculation current->counter may be > current->priority
before the above is executed. In this case not only does the parent not get
any of the child's ticks, it loses some of its own. This tick reclamation
looks questionable if the parent's counter has been renewed since the fork().
In that case, contrary to the comment, the above can be used to artificially
'generate' timeslices.

--
Dimitris Michailidis dimitris@engr.sgi.com

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

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:1.099 / U:0.396 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site