cls->shares = *shares;
cls->cnt_lock = SPIN_LOCK_UNLOCKED;
ckrm_cpu_stat_init(&cls->stat);
+ ckrm_usage_init(&cls->usage);
cls->magic = CKRM_CPU_CLASS_MAGIC;
for (i = 0 ; i < NR_CPUS ; i++) {
queue->classqueue = get_cpu_classqueue(i);
queue->top_priority = MAX_PRIO;
cq_node_init(&queue->classqueue_linkobj);
- queue->local_cvt = CVT_INTERACTIVE_BONUS;
+ queue->local_cvt = 0;
queue->lrq_load = 0;
queue->local_weight = cpu_class_weight(cls);
queue->uncounted_ns = 0;
+ queue->savings = 0;
queue->magic = 0x43FF43D7;
}
write_unlock(&class_list_lock);
kfree(cls);
+
+ //call ckrm_cpu_monitor after class removed
+ ckrm_cpu_monitor(0);
}
/*
if (cls->parent) {
spin_unlock(&parres->cnt_lock);
}
+
+ //call ckrm_cpu_monitor after changes are changed
+ ckrm_cpu_monitor(0);
+
return rc;
}
seq_printf(sfile, "\tmehl= %d\n",stat->mehl);
seq_printf(sfile, "\teshare= %d\n",stat->eshare);
seq_printf(sfile, "\tmeshare= %d\n",cpu_class_weight(cls));
- seq_printf(sfile, "\ttotal_ns= %llu\n",stat->total_ns);
seq_printf(sfile, "\tmax_demand= %lu\n",stat->max_demand);
+ seq_printf(sfile, "\ttotal_ns= %llu\n",stat->total_ns);
+ seq_printf(sfile, "\tusage(2,10,60)= %d %d %d\n",
+ get_ckrm_usage(cls,2*HZ),
+ get_ckrm_usage(cls,10*HZ),
+ get_ckrm_usage(cls,60*HZ)
+ );
for_each_online_cpu(i) {
lrq = get_ckrm_lrq(cls,i);
- seq_printf(sfile, "\tlrq %d demand= %lu weight= %d lrq_load= %lu cvt= %llu\n",i,stat->local_stats[i].cpu_demand,local_class_weight(lrq),lrq->lrq_load,lrq->local_cvt);
+ seq_printf(sfile, "\tlrq %d demand= %lu weight= %d lrq_load= %lu cvt= %llu sav= %llu\n",i,stat->local_stats[i].cpu_demand,local_class_weight(lrq),lrq->lrq_load,lrq->local_cvt,lrq->savings);
}
seq_printf(sfile, "-------- CPU Class Status END ---------\n");
if (!cls)
return -EINVAL;
- printk("ckrm_cpu config='%s'\n",cfgstr);
+ printk(KERN_DEBUG "ckrm_cpu config='%s'\n",cfgstr);
return 0;
}
if (resid == -1) { /*not registered */
resid = ckrm_register_res_ctlr(clstype,&cpu_rcbs);
- printk("........init_ckrm_sched_res , resid= %d\n",resid);
+ printk(KERN_DEBUG "........init_ckrm_sched_res , resid= %d\n",resid);
}
return 0;
}