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/473577-change-way-determining-xen-scheduler.html)

Dave Anderson 01-07-2011 03:01 PM

Change the way of determining the Xen scheduler
 
----- Original Message -----
> 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.'

Queued for the next release.

Thanks,
Dave

> 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

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


All times are GMT. The time now is 05:29 PM.

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