Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   Change the way of determining the Xen scheduler (http://www.linux-archive.org/crash-utility/473555-change-way-determining-xen-scheduler.html)

Petr Tesarik 01-07-2011 02:24 PM

Change the way of determining the Xen scheduler
 
The command line options (such as opt_sched) are discarded after boot in Xen4,
so they are no longer available. Use the "ops" variable (if exists) to
determine the active scheduler. Without this patch, crash fails during
initialization on Xen4 hypervisor dumps with 'crash: schedule data not
found.'

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>
---
xen_hyper.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)

--- a/xen_hyper.c
+++ b/xen_hyper.c
@@ -445,13 +445,21 @@ xen_hyper_schedule_init(void)
error(FATAL, "cannot malloc scheduler struct space.
");
}
buf = GETBUF(XEN_HYPER_SCHEDULER_NAME);
- opt_sched = symbol_value("opt_sched");
+ scheduler_opt_name = XEN_HYPER_OFFSET(scheduler_opt_name);
+ if (symbol_exists("ops")) {
+ if (!readmem(symbol_value("ops") + scheduler_opt_name, KVADDR,
+ &opt_sched, sizeof(ulong), "ops.opt_name",
+ RETURN_ON_ERROR)) {
+ error(FATAL, "cannot read ops.opt_name.
");
+ }
+ } else {
+ opt_sched = symbol_value("opt_sched");
+ }
if (!readmem(opt_sched, KVADDR, xhscht->opt_sched,
XEN_HYPER_OPT_SCHED_SIZE, "opt_sched,", RETURN_ON_ERROR)) {
error(FATAL, "cannot read opt_sched,.
");
}
schedulers = symbol_value("schedulers");
- scheduler_opt_name = XEN_HYPER_OFFSET(scheduler_opt_name);
addr = schedulers;
while (xhscht->name == NULL) {
if (!readmem(addr, KVADDR, schedulers_buf,

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility

Petr Tesarik 01-17-2011 10:42 AM

Change the way of determining the Xen scheduler
 
The command line options (such as opt_sched) are discarded after boot
in Xen4, so they are no longer available. Use the "ops" variable (if
exists) to determine the active scheduler. Without this patch, crash
fails during initialization on Xen4 hypervisor dumps with
'crash: schedule data not found.'

Signed-off-by: Petr Tesarik <ptesarik@suse.cz>

---
xen_hyper.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--- a/xen_hyper.c
+++ b/xen_hyper.c
@@ -446,13 +446,21 @@ xen_hyper_schedule_init(void)
error(FATAL, "cannot malloc scheduler struct space.
");
}
buf = GETBUF(XEN_HYPER_SCHEDULER_NAME);
- opt_sched = symbol_value("opt_sched");
+ scheduler_opt_name = XEN_HYPER_OFFSET(scheduler_opt_name);
+ if (symbol_exists("ops")) {
+ if (!readmem(symbol_value("ops") + scheduler_opt_name, KVADDR,
+ &opt_sched, sizeof(ulong), "ops.opt_name",
+ RETURN_ON_ERROR)) {
+ error(FATAL, "cannot read ops.opt_name.
");
+ }
+ } else {
+ opt_sched = symbol_value("opt_sched");
+ }
if (!readmem(opt_sched, KVADDR, xhscht->opt_sched,
XEN_HYPER_OPT_SCHED_SIZE, "opt_sched,", RETURN_ON_ERROR)) {
error(FATAL, "cannot read opt_sched,.
");
}
schedulers = symbol_value("schedulers");
- scheduler_opt_name = XEN_HYPER_OFFSET(scheduler_opt_name);
addr = schedulers;
while (xhscht->name == NULL) {
if (!readmem(addr, KVADDR, schedulers_buf,

--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility


All times are GMT. The time now is 08:42 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.