Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Crash Utility (http://www.linux-archive.org/crash-utility/)
-   -   xen: Always calculate max_cpus value (http://www.linux-archive.org/crash-utility/683287-xen-always-calculate-max_cpus-value.html)

Daniel Kiper 07-13-2012 01:19 PM

xen: Always calculate max_cpus value
 
On Thu, Jul 05, 2012 at 04:56:39PM +0100, Jan Beulich wrote:
> >>> 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

Hmmm... I could not find such animal in Xen source code.
However, maybe I missed something.

> 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.

Yep, but I will try to improve that once again.

Daniel

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

Andrew Cooper 07-13-2012 02:51 PM

xen: Always calculate max_cpus value
 
On 13/07/12 14:19, Daniel Kiper wrote:
> On Thu, Jul 05, 2012 at 04:56:39PM +0100, Jan Beulich wrote:
>>>>> 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
> Hmmm... I could not find such animal in Xen source code.
> However, maybe I missed something.

nr_cpu_ids was introduced into xen-unstable with c/s 23982:511d5e65a302

It is not present in 4.1 or earlier.

~Andrew

>
>> 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.
> Yep, but I will try to improve that once again.
>
> Daniel

--
Andrew Cooper - Dom0 Kernel Engineer, Citrix XenServer
T: +44 (0)1223 225 900, http://www.citrix.com



--
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:03 AM.

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