Re: Please, put 64-bit counter per task and incr.by.one each ctxtswitch.

From: Andrew Morton
Date: Mon Feb 25 2008 - 15:36:57 EST


On Sun, 24 Feb 2008 14:12:47 +0100 "J.C. Pizarro" <jcpiza@xxxxxxxxx> wrote:

> It's statistic, yes, but it's a very important parameter for the CPU-scheduler.
> The CPU-scheduler will know the number of context switches of each task
> before of to take a blind decision into infinitum!.

We already have these:

unsigned long nvcsw, nivcsw; /* context switch counts */

in the task_struct.
--
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/