FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Crash Utility

 
 
LinkBack Thread Tools
 
Old 07-05-2012, 03:56 PM
"Jan Beulich"
 
Default xen: Always calculate max_cpus value

>>> On 05.07.12 at 17:00, Daniel Kiper <daniel.kiper@oracle.com> wrote:
> max_cpus is not available since 20374 changeset (Miscellaneous data
> placement adjustments). It was moved to __initdata section. This section
> is freed after Xen initialization. Assume that max_cpus is always
> equal to XEN_HYPER_SIZE(cpumask_t) * 8.

Using nr_cpu_ids, when available, would seem a better fit. And
I donm't see why, on dumps from old hypervisors, you wouldn't
want to continue using max_cpus. Oh, wait, I see - you would
have to be able to tell whether it actually sits in .init.data, which
might not be strait forward.

Jan

> Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
>
> diff -Npru crash-6.0.8.orig/xen_hyper.c crash-6.0.8/xen_hyper.c
> --- crash-6.0.8.orig/xen_hyper.c 2012-06-29 16:59:18.000000000 +0200
> +++ crash-6.0.8/xen_hyper.c 2012-07-05 14:52:59.000000000 +0200
> @@ -1879,11 +1879,9 @@ xen_hyper_get_cpu_info(void)
> uint *cpu_idx;
> int i, j, cpus;
>
> - get_symbol_data("max_cpus", sizeof(xht->max_cpus), &xht->max_cpus);
> XEN_HYPER_STRUCT_SIZE_INIT(cpumask_t, "cpumask_t");
> - if (XEN_HYPER_SIZE(cpumask_t) * 8 > xht->max_cpus) {
> - xht->max_cpus = XEN_HYPER_SIZE(cpumask_t) * 8;
> - }
> + xht->max_cpus = XEN_HYPER_SIZE(cpumask_t) * 8;
> +
> if (xht->cpumask) {
> free(xht->cpumask);
> }
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel




--
Crash-utility mailing list
Crash-utility@redhat.com
https://www.redhat.com/mailman/listinfo/crash-utility
 
Old 08-10-2012, 01:25 PM
Daniel Kiper
 
Default xen: Always calculate max_cpus value

max_cpus is not available since 20374 changeset (Miscellaneous data
placement adjustments). It was moved to __initdata section. This section
is freed after Xen initialization. Assume that max_cpus is always
equal to XEN_HYPER_SIZE(cpumask_t) * 8.

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>

diff -Npru crash-6.0.8.orig/xen_hyper.c crash-6.0.8/xen_hyper.c
--- crash-6.0.8.orig/xen_hyper.c 2012-06-29 16:59:18.000000000 +0200
+++ crash-6.0.8/xen_hyper.c 2012-07-05 14:52:59.000000000 +0200
@@ -1879,11 +1879,9 @@ xen_hyper_get_cpu_info(void)
uint *cpu_idx;
int i, j, cpus;

- get_symbol_data("max_cpus", sizeof(xht->max_cpus), &xht->max_cpus);
XEN_HYPER_STRUCT_SIZE_INIT(cpumask_t, "cpumask_t");
- if (XEN_HYPER_SIZE(cpumask_t) * 8 > xht->max_cpus) {
- xht->max_cpus = XEN_HYPER_SIZE(cpumask_t) * 8;
- }
+ xht->max_cpus = XEN_HYPER_SIZE(cpumask_t) * 8;
+
if (xht->cpumask) {
free(xht->cpumask);
}

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

Thread Tools




All times are GMT. The time now is 01:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org