On Mon, 4 Oct 2004, Chen, Kenneth W wrote:
Update p->timestamp to "now" in activate_task() doesn't look right to me
at all. p->timestamp records last time it was running on a cpu. activate_task shouldn't update that variable when it queues a task on
the runqueue.
correct, we are overriding it in schedule():
if (likely(prev != next)) {
next->timestamp = now;
rq->nr_switches++;
the line your patch removes is a remnant of an earlier logic when we
timestamped tasks when they touched the runqueue. (vs. timestamping when
they actually run on a CPU.) So the patch looks good to me. Andrew, please
apply.