login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2009
»
December
»
24
Re: [PATCH 05/37] kdb: core for kgdb back end
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter Zijlstra
Subject:
Re: [PATCH 05/37] kdb: core for kgdb back end
Date: Thursday, December 24, 2009 - 4:04 am
On Wed, 2009-12-23 at 15:19 -0600, Jason Wessel wrote:
quoted text
> diff --git a/kernel/sched.c b/kernel/sched.c > index 87f1f47..6e1cfcf 100644 > --- a/kernel/sched.c > +++ b/kernel/sched.c > @@ -9785,7 +9785,7 @@ void normalize_rt_tasks(void) > > #endif /* CONFIG_MAGIC_SYSRQ */ > > -#ifdef CONFIG_IA64 > +#if defined(CONFIG_IA64) || defined(CONFIG_KGDB_KDB) > /* > * These functions are only useful for the IA64 MCA handling. > * > @@ -10912,6 +10912,97 @@ struct cgroup_subsys cpuacct_subsys = { > }; > #endif /* CONFIG_CGROUP_CPUACCT */ > > +#ifdef CONFIG_KGDB_KDB > +#include <linux/kdb.h> > + > +static void > +kdb_prio(char *name, struct rt_prio_array *array, kdb_printf_t xxx_printf, > + unsigned int cpu) > +{ > + int pri, printed_header = 0; > + struct task_struct *p; > + > + xxx_printf(" %s rt bitmap: 0x%lx 0x%lx 0x%lx\n", > + name, > + array->bitmap[0], array->bitmap[1], array->bitmap[2]); > + > + pri = sched_find_first_bit(array->bitmap); > + if (pri < MAX_RT_PRIO) { > + xxx_printf(" rt bitmap priorities:"); > + while (pri < MAX_RT_PRIO) { > + xxx_printf(" %d", pri); > + pri++; > + pri = find_next_bit(array->bitmap, MAX_RT_PRIO, pri); > + } > + xxx_printf("\n"); > + } > + > + for (pri = 0; pri < MAX_RT_PRIO; pri++) { > + int printed_hdr = 0; > + struct list_head *head, *curr; > + > + head = array->queue + pri; > + curr = head->next; > + while (curr != head) { > + struct task_struct *task; > + if (!printed_hdr) { > + xxx_printf(" queue at priority=%d\n", pri); > + printed_hdr = 1; > + } > + task = list_entry(curr, struct task_struct, > + rt.run_list); > + if (task) > + xxx_printf(" 0x%p %d %s time_slice:%d\n", > + task, task->pid, task->comm, > + task->rt.time_slice); > + curr = curr->next; > + } > + } > + for_each_process(p) { > + if (p->se.on_rq && (task_cpu(p) == cpu) && > + (p->policy == SCHED_NORMAL)) { > + if (!printed_header) { > + xxx_printf(" sched_normal queue:\n"); > + printed_header = 1; > + } > + xxx_printf(" 0x%p %d %s pri:%d spri:%d npri:%d\n", > + p, p->pid, p->comm, p->prio, > + p->static_prio, p->normal_prio); > + } > + } > +} > + > +/* This code must be in sched.c because struct rq is only defined in this > + * source. To allow most of kdb to be modular, this code cannot call any kdb > + * functions directly, any external functions that it needs must be passed in > + * as parameters. > + */
Wrong comment style.
quoted text
> +void > +kdb_runqueue(unsigned long cpu, kdb_printf_t xxx_printf) > +{ > + struct rq *rq; > + > + rq = cpu_rq(cpu); > + > + xxx_printf("CPU%ld lock:%s curr:0x%p(%d)(%s)", > + cpu, (raw_spin_is_locked(&rq->lock)) ? "LOCKED" : "free", > + rq->curr, rq->curr->pid, rq->curr->comm); > + if (rq->curr == rq->idle) > + xxx_printf(" is idle"); > + xxx_printf("\n "); > +#ifdef CONFIG_SMP > + xxx_printf(" cpu_load:%lu %lu %lu", > + rq->cpu_load[0], rq->cpu_load[1], rq->cpu_load[2]); > +#endif > + xxx_printf(" nr_running:%lu nr_switches:%llu\n", > + rq->nr_running, (long long)rq->nr_switches); > + kdb_prio("active", &rq->rt.active, xxx_printf, (unsigned int)cpu); > +} > +EXPORT_SYMBOL(kdb_runqueue); > + > +#endif /* CONFIG_KGDB_KDB */ > +
So what is this code supposed to do? It looks like it simply cannot be correct. --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH 0/37] kgdb, kdb and atomic kernel modesetting series
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 01/37] softlockup: add sched_clock_tick() to avoid ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 02/37] x86,hw_breakpoint,kgdb: kgdb to use hw_break ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 03/37] Move kernel/kgdb.c to kernel/debug/debug_core.c
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 04/37] Separate the gdbstub from the debug core
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 05/37] kdb: core for kgdb back end
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 06/37] kgdb: eliminate kgdb_wait(), all cpus enter ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 07/37] kgdb,sparc: Add in kgdb_arch_set_pc for sparc
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 08/37] kgdb,sh: update superh kgdb exception handling
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 09/37] kgdb,blackfin: Add in kgdb_arch_set_pc for b ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 10/37] kgdb: Make mem access function weak in kgdb. ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 11/37] kgdb: Fix kernel-doc format error in kgdb.h
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 12/37] kgdb: core changes to support kdb
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 13/37] kgdb,8250,pl011: Return immediately from con ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 14/37] sh,sh-sci: Use NO_POLL_CHAR in the SCIF poll ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 15/37] sparc,sunzilog: Add console polling support ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 16/37] kgdb: gdb "monitor" -> kdb passthrough
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 17/37] kgdboc,keyboard: Keyboard driver for kdb wit ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 18/37] kgdb: remove post_primary_code references
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 19/37] x86,kgdb: Add low level debug hook
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 20/37] arm,kgdb: Add hook to catch an oops with deb ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 21/37] powerpc,kgdb: Introduce low level trap catching
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 22/37] mips,kgdb: kdb low level trap catch and stac ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 23/37] kgdb: Add the ability to schedule a breakpoi ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 24/37] kgdboc,kdb: Allow kdb to work on a non open ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 25/37] printk,kdb: capture printk() when in kdb shell
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 26/37] keyboard, input: Add hook to input to allow ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 27/37] debug_core,kdb: Allow the debug core to proc ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 28/37] kdb,panic,debug_core: Allow the debug core t ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 29/37] MAINTAINERS: update kgdb, kdb, and debug_cor ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 30/37] kgdboc,debug_core: Add call backs to allow k ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 31/37] kgdb: add ops arg to kgdb console active & r ...
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 32/37] kms,kdb: Force unblank a console device
, Jason Wessel
, (Wed Dec 23, 2:19 pm)
[PATCH 33/37] drm: add KGDB/KDB support Add support for KD ...
, Jason Wessel
, (Wed Dec 23, 2:43 pm)
[PATCH 34/37] i915: when kgdb is active display compressio ...
, Jason Wessel
, (Wed Dec 23, 2:43 pm)
[PATCH 35/37] drm_fb_helper: Preserve capability to use at ...
, Jason Wessel
, (Wed Dec 23, 2:43 pm)
[PATCH 36/37] drm,i915 - atomic mutex hacks
, Jason Wessel
, (Wed Dec 23, 2:43 pm)
[PATCH 37/37] kgdbts,sh: Add in breakpoint pc offset for s ...
, Jason Wessel
, (Wed Dec 23, 2:43 pm)
Re: [PATCH 07/37] kgdb,sparc: Add in kgdb_arch_set_pc for ...
, David Miller
, (Wed Dec 23, 2:48 pm)
Re: [PATCH 15/37] sparc,sunzilog: Add console polling supp ...
, David Miller
, (Wed Dec 23, 2:50 pm)
Re: [PATCH 15/37] sparc,sunzilog: Add console polling supp ...
, Jason Wessel
, (Wed Dec 23, 2:54 pm)
Re: [PATCH 15/37] sparc,sunzilog: Add console polling supp ...
, David Miller
, (Wed Dec 23, 3:00 pm)
Re: [PATCH 07/37] kgdb,sparc: Add in kgdb_arch_set_pc for ...
, Jason Wessel
, (Wed Dec 23, 4:04 pm)
Re: [PATCH 0/37] kgdb, kdb and atomic kernel modesetting s ...
, Greg KH
, (Wed Dec 23, 5:56 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Andi Kleen
, (Wed Dec 23, 6:28 pm)
Re: [Kgdb-bugreport] [PATCH 0/37] kgdb,kdb and atomic kern ...
, Jason Wessel
, (Wed Dec 23, 8:55 pm)
Re: [PATCH 37/37] kgdbts,sh: Add in breakpoint pc offset f ...
, Paul Mundt
, (Wed Dec 23, 8:58 pm)
Re: [PATCH 07/37] kgdb,sparc: Add in kgdb_arch_set_pc for ...
, David Miller
, (Wed Dec 23, 9:42 pm)
Re: [PATCH 08/37] kgdb,sh: update superh kgdb exception ha ...
, Paul Mundt
, (Wed Dec 23, 11:07 pm)
Re: [PATCH 14/37] sh,sh-sci: Use NO_POLL_CHAR in the SCIF ...
, Paul Mundt
, (Wed Dec 23, 11:08 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Peter Zijlstra
, (Thu Dec 24, 4:01 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Peter Zijlstra
, (Thu Dec 24, 4:04 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Peter Zijlstra
, (Thu Dec 24, 4:16 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Jason Wessel
, (Thu Dec 24, 4:55 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Peter Zijlstra
, (Thu Dec 24, 5:01 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Jason Wessel
, (Thu Dec 24, 8:57 am)
Re: [PATCH 10/37] kgdb: Make mem access function weak in k ...
, Mike Frysinger
, (Sat Dec 26, 2:07 pm)
Re: [PATCH 09/37] kgdb,blackfin: Add in kgdb_arch_set_pc f ...
, Mike Frysinger
, (Sat Dec 26, 2:12 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Mike Frysinger
, (Sat Dec 26, 2:34 pm)
RE: [PATCH 09/37] kgdb,blackfin: Add in kgdb_arch_set_pc f ...
, Zhang, Sonic
, (Mon Dec 28, 2:49 am)
RE: [PATCH 09/37] kgdb,blackfin: Add in kgdb_arch_set_pc f ...
, Zhang, Sonic
, (Mon Dec 28, 2:57 am)
RE: [PATCH 09/37] kgdb,blackfin: Add in kgdb_arch_set_pc f ...
, Zhang, Sonic
, (Mon Dec 28, 3:17 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Jason Wessel
, (Mon Dec 28, 9:33 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Peter Zijlstra
, (Mon Dec 28, 9:55 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Jason Wessel
, (Mon Dec 28, 10:15 am)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Jason Wessel
, (Mon Dec 28, 3:36 pm)
Re: [PATCH 05/37] kdb: core for kgdb back end
, Andi Kleen
, (Mon Dec 28, 4:37 pm)
Re: [PATCH 09/37] kgdb,blackfin: Add in kgdb_arch_set_pc f ...
, Sonic Zhang
, (Wed Dec 30, 7:45 pm)
Re: [PATCH 33/37] drm: add KGDB/KDB support Add support fo ...
, Jesse Barnes
, (Mon Jan 4, 10:23 am)
Re: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in k ...
, Jason Wessel
, (Wed Jan 6, 12:43 pm)
Re: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in ...
, Mike Frysinger
, (Wed Jan 6, 1:08 pm)
Re: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in k ...
, Jason Wessel
, (Wed Jan 6, 1:34 pm)
Re: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in ...
, Mike Frysinger
, (Wed Jan 6, 1:39 pm)
Re: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in k ...
, Jason Wessel
, (Wed Jan 6, 3:40 pm)
RE: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in k ...
, Zhang, Sonic
, (Wed Jan 6, 8:50 pm)
Re: [Kgdb-bugreport] [PATCH 09/37] kgdb,blackfin: Add in ...
, Mike Frysinger
, (Wed Jan 6, 11:27 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Greg KH
Og dreams of kernels
Jens Axboe
[PATCH 31/33] Fusion: sg chaining support
Arnd Bergmann
Re: finding your own dead "CONFIG_" variables
Mark Brown
[PATCH 2/2] Subject: natsemi: Allow users to disable workaround for DspCfg reset
Tony Breeds
[LGUEST] Look in object dir for .config
git
:
Brian Downing
Re: Git in a Nutshell guide
John Benes
Re: master has some toys
Matthias Lederhofer
[PATCH 4/7] introduce GIT_WORK_TREE to specify the work tree
Alexander Sulfrian
[RFC/PATCH] RE: git calls SSH_ASKPASS even if DISPLAY is not set
Junio C Hamano
Re: Rss produced by git is not valid xml?
git-commits-head
:
Linux Kernel Mailing List
iSeries: fix section mismatch in iseries_veth
Linux Kernel Mailing List
ixbge