O(1) and kdb
anton wilson
anton.wilson at camotion.com
Fri Jul 19 15:46:15 PDT 2002
Not sure if anyone's interested, but to change KDB to use the O(1) scheduler
just replace
+ task_has_cpu(p), p->processor,
with
+ (p->array != NULL), p->cpu,
in the common patch at:
+int
+kdb_ps(int argc, const char **argv, const char **envp, struct pt_regs *regs)
+{
+ struct task_struct *p;
+
+ kdb_printf("%-*s Pid Parent [*] cpu State %-*s Command\n",
+ (int)(2*sizeof(void *))+2, "Task Addr",
+ (int)(2*sizeof(void *))+2, "Thread");
+ for_each_task(p) {
+ kdb_printf("0x%p %08d %08d %1.1d %3.3d %s 0x%p%c%s\n",
+ (void *)p, p->pid, p->p_pptr->pid,
+ task_has_cpu(p), p->processor,
+ (p->state == 0)?"run ":(p->state>0)?"stop":"unrn",
+ (void *)(&p->thread),
+ (p == current) ? '*': ' ',
+ p->comm);
+ }
+
+ return 0;
+}
Anton
More information about the kdb
mailing list