if (p) { if (task_on_rq_migrating(p)) { /* * Preserve migrating task's wait time so wait_start * time stamp can be adjusted to accumulate wait time * prior to migration.
*/
__schedstat_set(stats->wait_start, delta);
/* * Current schedstat API version. * * Bump this up when changing the output format or the meaning of an existing * format, so that tools can adapt (or abort)
*/ #define SCHEDSTAT_VERSION 17
staticint show_schedstat(struct seq_file *seq, void *v)
{ int cpu;
if (v == (void *)1) {
seq_printf(seq, "version %d\n", SCHEDSTAT_VERSION);
seq_printf(seq, "timestamp %lu\n", jiffies);
} else { struct rq *rq; struct sched_domain *sd; int dcount = 0;
cpu = (unsignedlong)(v - 2);
rq = cpu_rq(cpu);
/* * This iterator needs some explanation. * It returns 1 for the header position. * This means 2 is cpu 0. * In a hotplugged system some CPUs, including cpu 0, may be missing so we have * to use cpumask_* to iterate over the CPUs.
*/ staticvoid *schedstat_start(struct seq_file *file, loff_t *offset)
{ unsignedlong n = *offset;
if (n == 0) return (void *) 1;
n--;
if (n > 0)
n = cpumask_next(n - 1, cpu_online_mask); else
n = cpumask_first(cpu_online_mask);
*offset = n + 1;
if (n < nr_cpu_ids) return (void *)(unsignedlong)(n + 2);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.