Popular Threads From Freebsd-stable:
List Statistics
- Total Threads: 2123
- Total Posts: 4994
Phrases Used to Find This Thread
|
# 1

14-07-2010 03:14 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 2

14-07-2010 03:33 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 3

14-07-2010 03:44 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 4

14-07-2010 03:57 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 5

14-07-2010 04:12 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 6

14-07-2010 06:31 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 7

14-07-2010 10:48 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 8

14-07-2010 10:55 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 9

15-07-2010 11:22 AM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 10

15-07-2010 12:58 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 11

15-07-2010 01:03 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 12

15-07-2010 01:05 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 13

15-07-2010 01:27 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 14

15-07-2010 01:38 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 15:27 Oliver Fromme said the following:
> Unfortunately, it didn't change. Kernel output during boot
> is still the same; it displays 1 package x 8 cores.
If you are sure that everything is done correctly (patch really applied, kernel
really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
jkim would be interested in this issue.
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 15

15-07-2010 05:57 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 15:27 Oliver Fromme said the following:
> Unfortunately, it didn't change. Kernel output during boot
> is still the same; it displays 1 package x 8 cores.
If you are sure that everything is done correctly (patch really applied, kernel
really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
jkim would be interested in this issue.
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 15:27 Oliver Fromme said the following:
> > Unfortunately, it didn't change. Kernel output during boot
> > is still the same; it displays 1 package x 8 cores.
>
> If you are sure that everything is done correctly (patch really applied, kernel
> really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
> jkim would be interested in this issue.
Yes, I'm sure, I even added some printf() so I can be sure
that the patched code is actually executed.
Here is what happens in sys/amd64/amd64/mp_machdep.c:
In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
called. But the cpuid 0xb instruction doesn't seem to
return useful data: All values are zero already in the
first level, so cpu_cores remains 0.
Back in topo_probe(), there is a fallback if cpu_cores is
stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
which is wrong.
I patched topo_probe() so it calls topo_probe_0x4() after
topo_probe_0xb() if cpu_cores is still 0. I think this
is a better fallback procedure. With this patch, cpu_cores
gets the value 4 which is the correct one, finally:
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s)
This is the patch, it's against jkim's patched version:
@@ -265,7 +268,7 @@
else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
if (cpu_high >= 0xb)
topo_probe_0xb();
- else if (cpu_high >= 0x4)
+ if (cpu_high >= 0x4 && cpu_cores == 0)
topo_probe_0x4();
}
if (cpu_cores == 0)
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 16

15-07-2010 06:56 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 15:27 Oliver Fromme said the following:
> Unfortunately, it didn't change. Kernel output during boot
> is still the same; it displays 1 package x 8 cores.
If you are sure that everything is done correctly (patch really applied, kernel
really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
jkim would be interested in this issue.
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 15:27 Oliver Fromme said the following:
> > Unfortunately, it didn't change. Kernel output during boot
> > is still the same; it displays 1 package x 8 cores.
>
> If you are sure that everything is done correctly (patch really applied, kernel
> really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
> jkim would be interested in this issue.
Yes, I'm sure, I even added some printf() so I can be sure
that the patched code is actually executed.
Here is what happens in sys/amd64/amd64/mp_machdep.c:
In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
called. But the cpuid 0xb instruction doesn't seem to
return useful data: All values are zero already in the
first level, so cpu_cores remains 0.
Back in topo_probe(), there is a fallback if cpu_cores is
stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
which is wrong.
I patched topo_probe() so it calls topo_probe_0x4() after
topo_probe_0xb() if cpu_cores is still 0. I think this
is a better fallback procedure. With this patch, cpu_cores
gets the value 4 which is the correct one, finally:
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s)
This is the patch, it's against jkim's patched version:
@@ -265,7 +268,7 @@
else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
if (cpu_high >= 0xb)
topo_probe_0xb();
- else if (cpu_high >= 0x4)
+ if (cpu_high >= 0x4 && cpu_cores == 0)
topo_probe_0x4();
}
if (cpu_cores == 0)
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 19:57 Oliver Fromme said the following:
> In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> called. But the cpuid 0xb instruction doesn't seem to
> return useful data: All values are zero already in the
> first level, so cpu_cores remains 0.
>
> Back in topo_probe(), there is a fallback if cpu_cores is
> stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> which is wrong.
>
> I patched topo_probe() so it calls topo_probe_0x4() after
> topo_probe_0xb() if cpu_cores is still 0. I think this
> is a better fallback procedure. With this patch, cpu_cores
> gets the value 4 which is the correct one, finally:
>
> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> FreeBSD/SMP: 2 package(s) x 4 core(s)
Thank you for debugging this issue!
Not sure if this is the best patch that there can be, but its direction is
definitely correct.
As the Intel document says (translated to our x86 mp_machdep.c terms):
if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
otherwise we should fall back to topo_probe_0x4, etc.
I think that your addition achieves this effect, perhaps just not as explicitly as
I would preferred.
Jung-uk, what do you think?
>
> This is the patch, it's against jkim's patched version:
> @@ -265,7 +268,7 @@
> else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> if (cpu_high >= 0xb)
> topo_probe_0xb();
> - else if (cpu_high >= 0x4)
> + if (cpu_high >= 0x4 && cpu_cores == 0)
> topo_probe_0x4();
> }
> if (cpu_cores == 0)
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 17

15-07-2010 07:32 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 15:27 Oliver Fromme said the following:
> Unfortunately, it didn't change. Kernel output during boot
> is still the same; it displays 1 package x 8 cores.
If you are sure that everything is done correctly (patch really applied, kernel
really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
jkim would be interested in this issue.
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 15:27 Oliver Fromme said the following:
> > Unfortunately, it didn't change. Kernel output during boot
> > is still the same; it displays 1 package x 8 cores.
>
> If you are sure that everything is done correctly (patch really applied, kernel
> really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
> jkim would be interested in this issue.
Yes, I'm sure, I even added some printf() so I can be sure
that the patched code is actually executed.
Here is what happens in sys/amd64/amd64/mp_machdep.c:
In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
called. But the cpuid 0xb instruction doesn't seem to
return useful data: All values are zero already in the
first level, so cpu_cores remains 0.
Back in topo_probe(), there is a fallback if cpu_cores is
stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
which is wrong.
I patched topo_probe() so it calls topo_probe_0x4() after
topo_probe_0xb() if cpu_cores is still 0. I think this
is a better fallback procedure. With this patch, cpu_cores
gets the value 4 which is the correct one, finally:
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s)
This is the patch, it's against jkim's patched version:
@@ -265,7 +268,7 @@
else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
if (cpu_high >= 0xb)
topo_probe_0xb();
- else if (cpu_high >= 0x4)
+ if (cpu_high >= 0x4 && cpu_cores == 0)
topo_probe_0x4();
}
if (cpu_cores == 0)
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 19:57 Oliver Fromme said the following:
> In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> called. But the cpuid 0xb instruction doesn't seem to
> return useful data: All values are zero already in the
> first level, so cpu_cores remains 0.
>
> Back in topo_probe(), there is a fallback if cpu_cores is
> stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> which is wrong.
>
> I patched topo_probe() so it calls topo_probe_0x4() after
> topo_probe_0xb() if cpu_cores is still 0. I think this
> is a better fallback procedure. With this patch, cpu_cores
> gets the value 4 which is the correct one, finally:
>
> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> FreeBSD/SMP: 2 package(s) x 4 core(s)
Thank you for debugging this issue!
Not sure if this is the best patch that there can be, but its direction is
definitely correct.
As the Intel document says (translated to our x86 mp_machdep.c terms):
if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
otherwise we should fall back to topo_probe_0x4, etc.
I think that your addition achieves this effect, perhaps just not as explicitly as
I would preferred.
Jung-uk, what do you think?
>
> This is the patch, it's against jkim's patched version:
> @@ -265,7 +268,7 @@
> else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> if (cpu_high >= 0xb)
> topo_probe_0xb();
> - else if (cpu_high >= 0x4)
> + if (cpu_high >= 0x4 && cpu_cores == 0)
> topo_probe_0x4();
> }
> if (cpu_cores == 0)
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Thursday, July 15, 2010 1:56:11 pm Andriy Gapon wrote:
> on 15/07/2010 19:57 Oliver Fromme said the following:
> > In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> > called. But the cpuid 0xb instruction doesn't seem to
> > return useful data: All values are zero already in the
> > first level, so cpu_cores remains 0.
> >
> > Back in topo_probe(), there is a fallback if cpu_cores is
> > stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> > which is wrong.
> >
> > I patched topo_probe() so it calls topo_probe_0x4() after
> > topo_probe_0xb() if cpu_cores is still 0. I think this
> > is a better fallback procedure. With this patch, cpu_cores
> > gets the value 4 which is the correct one, finally:
> >
> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > FreeBSD/SMP: 2 package(s) x 4 core(s)
>
> Thank you for debugging this issue!
> Not sure if this is the best patch that there can be, but its direction is
> definitely correct.
> As the Intel document says (translated to our x86 mp_machdep.c terms):
> if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
> value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
> otherwise we should fall back to topo_probe_0x4, etc.
>
> I think that your addition achieves this effect, perhaps just not as explicitly as
> I would preferred.
Maybe have topo_probe_0xb() explicitly call topo_probe_0x4() if EBX is 0?
--
John Baldwin
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 18

15-07-2010 08:07 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 15:27 Oliver Fromme said the following:
> Unfortunately, it didn't change. Kernel output during boot
> is still the same; it displays 1 package x 8 cores.
If you are sure that everything is done correctly (patch really applied, kernel
really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
jkim would be interested in this issue.
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 15:27 Oliver Fromme said the following:
> > Unfortunately, it didn't change. Kernel output during boot
> > is still the same; it displays 1 package x 8 cores.
>
> If you are sure that everything is done correctly (patch really applied, kernel
> really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
> jkim would be interested in this issue.
Yes, I'm sure, I even added some printf() so I can be sure
that the patched code is actually executed.
Here is what happens in sys/amd64/amd64/mp_machdep.c:
In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
called. But the cpuid 0xb instruction doesn't seem to
return useful data: All values are zero already in the
first level, so cpu_cores remains 0.
Back in topo_probe(), there is a fallback if cpu_cores is
stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
which is wrong.
I patched topo_probe() so it calls topo_probe_0x4() after
topo_probe_0xb() if cpu_cores is still 0. I think this
is a better fallback procedure. With this patch, cpu_cores
gets the value 4 which is the correct one, finally:
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s)
This is the patch, it's against jkim's patched version:
@@ -265,7 +268,7 @@
else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
if (cpu_high >= 0xb)
topo_probe_0xb();
- else if (cpu_high >= 0x4)
+ if (cpu_high >= 0x4 && cpu_cores == 0)
topo_probe_0x4();
}
if (cpu_cores == 0)
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 19:57 Oliver Fromme said the following:
> In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> called. But the cpuid 0xb instruction doesn't seem to
> return useful data: All values are zero already in the
> first level, so cpu_cores remains 0.
>
> Back in topo_probe(), there is a fallback if cpu_cores is
> stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> which is wrong.
>
> I patched topo_probe() so it calls topo_probe_0x4() after
> topo_probe_0xb() if cpu_cores is still 0. I think this
> is a better fallback procedure. With this patch, cpu_cores
> gets the value 4 which is the correct one, finally:
>
> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> FreeBSD/SMP: 2 package(s) x 4 core(s)
Thank you for debugging this issue!
Not sure if this is the best patch that there can be, but its direction is
definitely correct.
As the Intel document says (translated to our x86 mp_machdep.c terms):
if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
otherwise we should fall back to topo_probe_0x4, etc.
I think that your addition achieves this effect, perhaps just not as explicitly as
I would preferred.
Jung-uk, what do you think?
>
> This is the patch, it's against jkim's patched version:
> @@ -265,7 +268,7 @@
> else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> if (cpu_high >= 0xb)
> topo_probe_0xb();
> - else if (cpu_high >= 0x4)
> + if (cpu_high >= 0x4 && cpu_cores == 0)
> topo_probe_0x4();
> }
> if (cpu_cores == 0)
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Thursday, July 15, 2010 1:56:11 pm Andriy Gapon wrote:
> on 15/07/2010 19:57 Oliver Fromme said the following:
> > In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> > called. But the cpuid 0xb instruction doesn't seem to
> > return useful data: All values are zero already in the
> > first level, so cpu_cores remains 0.
> >
> > Back in topo_probe(), there is a fallback if cpu_cores is
> > stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> > which is wrong.
> >
> > I patched topo_probe() so it calls topo_probe_0x4() after
> > topo_probe_0xb() if cpu_cores is still 0. I think this
> > is a better fallback procedure. With this patch, cpu_cores
> > gets the value 4 which is the correct one, finally:
> >
> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > FreeBSD/SMP: 2 package(s) x 4 core(s)
>
> Thank you for debugging this issue!
> Not sure if this is the best patch that there can be, but its direction is
> definitely correct.
> As the Intel document says (translated to our x86 mp_machdep.c terms):
> if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
> value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
> otherwise we should fall back to topo_probe_0x4, etc.
>
> I think that your addition achieves this effect, perhaps just not as explicitly as
> I would preferred.
Maybe have topo_probe_0xb() explicitly call topo_probe_0x4() if EBX is 0?
--
John Baldwin
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Thursday 15 July 2010 01:56 pm, Andriy Gapon wrote:
> on 15/07/2010 19:57 Oliver Fromme said the following:
> > In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> > called. But the cpuid 0xb instruction doesn't seem to
> > return useful data: All values are zero already in the
> > first level, so cpu_cores remains 0.
> >
> > Back in topo_probe(), there is a fallback if cpu_cores is
> > stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> > which is wrong.
> >
> > I patched topo_probe() so it calls topo_probe_0x4() after
> > topo_probe_0xb() if cpu_cores is still 0. I think this
> > is a better fallback procedure. With this patch, cpu_cores
> > gets the value 4 which is the correct one, finally:
> >
> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > FreeBSD/SMP: 2 package(s) x 4 core(s)
>
> Thank you for debugging this issue!
> Not sure if this is the best patch that there can be, but its
> direction is definitely correct.
> As the Intel document says (translated to our x86 mp_machdep.c
> terms): if cpu_high >= 0xb then we should execute cpuid_count(0xb,
> 0, p) and examine EBX value (p[1]), only if it's non-zero should we
> proceed with topo_probe_0xb(), otherwise we should fall back to
> topo_probe_0x4, etc.
>
> I think that your addition achieves this effect, perhaps just not
> as explicitly as I would preferred.
>
> Jung-uk, what do you think?
Yes, you're right. Please try new patch:
http://people.freebsd.org/~jkim/mp_machdep2.diff
Thanks,
Jung-uk Kim
> > This is the patch, it's against jkim's patched version:
> > @@ -265,7 +268,7 @@
> > else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> > if (cpu_high >= 0xb)
> > topo_probe_0xb();
> > - else if (cpu_high >= 0x4)
> > + if (cpu_high >= 0x4 && cpu_cores == 0)
> > topo_probe_0x4();
> > }
> > if (cpu_cores == 0)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 19

15-07-2010 09:01 PM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 15:27 Oliver Fromme said the following:
> Unfortunately, it didn't change. Kernel output during boot
> is still the same; it displays 1 package x 8 cores.
If you are sure that everything is done correctly (patch really applied, kernel
really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
jkim would be interested in this issue.
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 15:27 Oliver Fromme said the following:
> > Unfortunately, it didn't change. Kernel output during boot
> > is still the same; it displays 1 package x 8 cores.
>
> If you are sure that everything is done correctly (patch really applied, kernel
> really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
> jkim would be interested in this issue.
Yes, I'm sure, I even added some printf() so I can be sure
that the patched code is actually executed.
Here is what happens in sys/amd64/amd64/mp_machdep.c:
In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
called. But the cpuid 0xb instruction doesn't seem to
return useful data: All values are zero already in the
first level, so cpu_cores remains 0.
Back in topo_probe(), there is a fallback if cpu_cores is
stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
which is wrong.
I patched topo_probe() so it calls topo_probe_0x4() after
topo_probe_0xb() if cpu_cores is still 0. I think this
is a better fallback procedure. With this patch, cpu_cores
gets the value 4 which is the correct one, finally:
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s)
This is the patch, it's against jkim's patched version:
@@ -265,7 +268,7 @@
else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
if (cpu_high >= 0xb)
topo_probe_0xb();
- else if (cpu_high >= 0x4)
+ if (cpu_high >= 0x4 && cpu_cores == 0)
topo_probe_0x4();
}
if (cpu_cores == 0)
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 19:57 Oliver Fromme said the following:
> In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> called. But the cpuid 0xb instruction doesn't seem to
> return useful data: All values are zero already in the
> first level, so cpu_cores remains 0.
>
> Back in topo_probe(), there is a fallback if cpu_cores is
> stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> which is wrong.
>
> I patched topo_probe() so it calls topo_probe_0x4() after
> topo_probe_0xb() if cpu_cores is still 0. I think this
> is a better fallback procedure. With this patch, cpu_cores
> gets the value 4 which is the correct one, finally:
>
> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> FreeBSD/SMP: 2 package(s) x 4 core(s)
Thank you for debugging this issue!
Not sure if this is the best patch that there can be, but its direction is
definitely correct.
As the Intel document says (translated to our x86 mp_machdep.c terms):
if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
otherwise we should fall back to topo_probe_0x4, etc.
I think that your addition achieves this effect, perhaps just not as explicitly as
I would preferred.
Jung-uk, what do you think?
>
> This is the patch, it's against jkim's patched version:
> @@ -265,7 +268,7 @@
> else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> if (cpu_high >= 0xb)
> topo_probe_0xb();
> - else if (cpu_high >= 0x4)
> + if (cpu_high >= 0x4 && cpu_cores == 0)
> topo_probe_0x4();
> }
> if (cpu_cores == 0)
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Thursday, July 15, 2010 1:56:11 pm Andriy Gapon wrote:
> on 15/07/2010 19:57 Oliver Fromme said the following:
> > In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> > called. But the cpuid 0xb instruction doesn't seem to
> > return useful data: All values are zero already in the
> > first level, so cpu_cores remains 0.
> >
> > Back in topo_probe(), there is a fallback if cpu_cores is
> > stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> > which is wrong.
> >
> > I patched topo_probe() so it calls topo_probe_0x4() after
> > topo_probe_0xb() if cpu_cores is still 0. I think this
> > is a better fallback procedure. With this patch, cpu_cores
> > gets the value 4 which is the correct one, finally:
> >
> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > FreeBSD/SMP: 2 package(s) x 4 core(s)
>
> Thank you for debugging this issue!
> Not sure if this is the best patch that there can be, but its direction is
> definitely correct.
> As the Intel document says (translated to our x86 mp_machdep.c terms):
> if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
> value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
> otherwise we should fall back to topo_probe_0x4, etc.
>
> I think that your addition achieves this effect, perhaps just not as explicitly as
> I would preferred.
Maybe have topo_probe_0xb() explicitly call topo_probe_0x4() if EBX is 0?
--
John Baldwin
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Thursday 15 July 2010 01:56 pm, Andriy Gapon wrote:
> on 15/07/2010 19:57 Oliver Fromme said the following:
> > In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> > called. But the cpuid 0xb instruction doesn't seem to
> > return useful data: All values are zero already in the
> > first level, so cpu_cores remains 0.
> >
> > Back in topo_probe(), there is a fallback if cpu_cores is
> > stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> > which is wrong.
> >
> > I patched topo_probe() so it calls topo_probe_0x4() after
> > topo_probe_0xb() if cpu_cores is still 0. I think this
> > is a better fallback procedure. With this patch, cpu_cores
> > gets the value 4 which is the correct one, finally:
> >
> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > FreeBSD/SMP: 2 package(s) x 4 core(s)
>
> Thank you for debugging this issue!
> Not sure if this is the best patch that there can be, but its
> direction is definitely correct.
> As the Intel document says (translated to our x86 mp_machdep.c
> terms): if cpu_high >= 0xb then we should execute cpuid_count(0xb,
> 0, p) and examine EBX value (p[1]), only if it's non-zero should we
> proceed with topo_probe_0xb(), otherwise we should fall back to
> topo_probe_0x4, etc.
>
> I think that your addition achieves this effect, perhaps just not
> as explicitly as I would preferred.
>
> Jung-uk, what do you think?
Yes, you're right. Please try new patch:
http://people.freebsd.org/~jkim/mp_machdep2.diff
Thanks,
Jung-uk Kim
> > This is the patch, it's against jkim's patched version:
> > @@ -265,7 +268,7 @@
> > else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> > if (cpu_high >= 0xb)
> > topo_probe_0xb();
> > - else if (cpu_high >= 0x4)
> > + if (cpu_high >= 0x4 && cpu_cores == 0)
> > topo_probe_0x4();
> > }
> > if (cpu_cores == 0)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jung-uk Kim wrote:
> On Thursday 15 July 2010 01:56 pm, Andriy Gapon wrote:
> > on 15/07/2010 19:57 Oliver Fromme said the following:
> > > I patched topo_probe() so it calls topo_probe_0x4() after
> > > topo_probe_0xb() if cpu_cores is still 0. I think this
> > > is a better fallback procedure. With this patch, cpu_cores
> > > gets the value 4 which is the correct one, finally:
> > [...]
> > I think that your addition achieves this effect, perhaps just not
> > as explicitly as I would preferred.
> >
> > Jung-uk, what do you think?
>
> Yes, you're right. Please try new patch:
>
> http://people.freebsd.org/~jkim/mp_machdep2.diff
Thank you!
I will have access to that particular machine on Monday again,
so testing the new patch will have to wait until Monday.
But from looking at your patch it should have the same result
as my simpler patch, so it should work fine.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"C++ is the only current language making COBOL look good."
-- Bertrand Meyer
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
# 20

16-07-2010 02:34 AM
|
|
|
In a machine installed yesterday, 8.1-PRERELEASE doesn't
seem to detect the number of CPU packages vs. cores per
package correctly:
| FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
| [...]
| Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
| Features=0xbfebfbff
| Features2=0x40ce3bd
| AMD Features=0x20000800
| AMD Features2=0x1
| TSC: P-state invariant
| real memory = 34359738368 (32768 MB)
| avail memory = 33151377408 (31615 MB)
| ACPI APIC Table:
| FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
| FreeBSD/SMP: 1 package(s) x 8 core(s)
| cpu0 (BSP): APIC ID: 0
| cpu1 (AP): APIC ID: 1
| cpu2 (AP): APIC ID: 2
| cpu3 (AP): APIC ID: 3
| cpu4 (AP): APIC ID: 4
| cpu5 (AP): APIC ID: 5
| cpu6 (AP): APIC ID: 6
| cpu7 (AP): APIC ID: 7
| ioapic1 irqs 24-47 on motherboard
| ioapic0 irqs 0-23 on motherboard
I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
with 4 cores per package), not 1 x 8. That's what the BIOS
displays during POST.
I'm not sure if this is just a "cosmetic" issue, or if this
is a critical thing ... I could imagine that performance
might be sub-optimal if the CPU topology isn't detected
correctly, but I'm not sure if FreeBSD can take advantage
of the topology.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"A misleading benchmark test can accomplish in minutes
what years of good engineering can never do." -- Dilbert (2009-03-02)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
Hi, can you show kern.sched.topology_spec ?
It would clarify things a bit.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > seem to detect the number of CPU packages vs. cores per
> > package correctly:
> >
> > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > | [...]
> > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > | Features=0xbfebfbff
> > | Features2=0x40ce3bd
> > | AMD Features=0x20000800
> > | AMD Features2=0x1
> > | TSC: P-state invariant
> > | real memory = 34359738368 (32768 MB)
> > | avail memory = 33151377408 (31615 MB)
> > | ACPI APIC Table:
> > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > | cpu0 (BSP): APIC ID: 0
> > | cpu1 (AP): APIC ID: 1
> > | cpu2 (AP): APIC ID: 2
> > | cpu3 (AP): APIC ID: 3
> > | cpu4 (AP): APIC ID: 4
> > | cpu5 (AP): APIC ID: 5
> > | cpu6 (AP): APIC ID: 6
> > | cpu7 (AP): APIC ID: 7
> > | ioapic1 irqs 24-47 on motherboard
> > | ioapic0 irqs 0-23 on motherboard
> >
> > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > with 4 cores per package), not 1 x 8. That's what the BIOS
> > displays during POST.
> >
>
> Hi, can you show kern.sched.topology_spec ?
> It would clarify things a bit.
Sure:
0, 1, 2, 3, 4, 5, 6, 7
0, 1, 2, 3, 4, 5, 6, 7
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
Blogging: Never before have so many people
with so little to say said so much to so few.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wed, Jul 14, 2010 at 04:44:05PM +0200, Oliver Fromme wrote:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > > package correctly:
> > >
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> > > | [...]
> > > | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > | Features2=0x40ce3bd
> > > | AMD Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> >
> > Hi, can you show kern.sched.topology_spec ?
> > It would clarify things a bit.
>
> Sure:
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
> 0, 1, 2, 3, 4, 5, 6, 7
>
>
>
>
>
Can you also provide the output of "acpidump -dt"? This will probably
be quite long (possibly 300KB or more), so you may want to put it up on
the web somewhere.
--
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jeremy Chadwick wrote:
> Can you also provide the output of "acpidump -dt"? This will probably
> be quite long (possibly 300KB or more), so you may want to put it up on
> the web somewhere.
http://www.secnetix.de/olli/tmp/acpidump-dt.txt
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
'Instead of asking why a piece of software is using "1970s technology,"
start asking why software is ignoring 30 years of accumulated wisdom.'
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 14/07/2010 17:14 Oliver Fromme said the following:
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
> | cpu0 (BSP): APIC ID: 0
> | cpu1 (AP): APIC ID: 1
> | cpu2 (AP): APIC ID: 2
> | cpu3 (AP): APIC ID: 3
> | cpu4 (AP): APIC ID: 4
> | cpu5 (AP): APIC ID: 5
> | cpu6 (AP): APIC ID: 6
> | cpu7 (AP): APIC ID: 7
> | ioapic1 irqs 24-47 on motherboard
> | ioapic0 irqs 0-23 on motherboard
>
> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> with 4 cores per package), not 1 x 8. That's what the BIOS
> displays during POST.
>
> I'm not sure if this is just a "cosmetic" issue, or if this
> is a critical thing ... I could imagine that performance
> might be sub-optimal if the CPU topology isn't detected
> correctly, but I'm not sure if FreeBSD can take advantage
> of the topology.
Could you please try to do the following?
1. Fetch topo-12212009.tar from the top of this page:
http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
2. Untar it and apply this patch to the code:
http://people.freebsd.org/~avg/cpu-topology.diff
3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
4. Run cpu_topology64.out and report back its output.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 00:40 Jung-uk Kim said the following:
> It's funny that I actually wrote a convenience script (and cleaned up
> today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Indeed. Your patch looks so much cleaner too.
Thanks!
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
> > on 14/07/2010 17:14 Oliver Fromme said the following:
> > > In a machine installed yesterday, 8.1-PRERELEASE doesn't
> > > seem to detect the number of CPU packages vs. cores per
> > >
> > > package correctly:
> > > | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
> > > | 2010 [...]
> > > | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
> > > | 0x1067a Family = 6 Model = 17 Stepping = 10
> > > | Features=0xbfebfbff
> > > |SE
> > > | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
> > > |SSE 2,SS,HTT,TM,PBE>
> > > | Features2=0x40ce3bd
> > > |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
> > > | Features=0x20000800
> > > | AMD Features2=0x1
> > > | TSC: P-state invariant
> > > | real memory = 34359738368 (32768 MB)
> > > | avail memory = 33151377408 (31615 MB)
> > > | ACPI APIC Table:
> > > | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > > | FreeBSD/SMP: 1 package(s) x 8 core(s)
> > > | cpu0 (BSP): APIC ID: 0
> > > | cpu1 (AP): APIC ID: 1
> > > | cpu2 (AP): APIC ID: 2
> > > | cpu3 (AP): APIC ID: 3
> > > | cpu4 (AP): APIC ID: 4
> > > | cpu5 (AP): APIC ID: 5
> > > | cpu6 (AP): APIC ID: 6
> > > | cpu7 (AP): APIC ID: 7
> > > | ioapic1 irqs 24-47 on motherboard
> > > | ioapic0 irqs 0-23 on motherboard
> > >
> > > I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
> > > with 4 cores per package), not 1 x 8. That's what the BIOS
> > > displays during POST.
> > >
> > > I'm not sure if this is just a "cosmetic" issue, or if this
> > > is a critical thing ... I could imagine that performance
> > > might be sub-optimal if the CPU topology isn't detected
> > > correctly, but I'm not sure if FreeBSD can take advantage
> > > of the topology.
> >
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-pr
> >oc essor-topology-enumeration/ 2. Untar it and apply this patch to
> > the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64
> > system installed) 4. Run cpu_topology64.out and report back its
> > output.
>
> It's funny that I actually wrote a convenience script (and cleaned
> up today):
>
> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>
> BTW, current topology detection code is not optimal for some Intel
> processors if my memory serves.
Surprisingly, I found a patch I wrote last year from /tmp of my
desktop and it is still applied cleanly. 8-)
Just in case, it is available from here:
http://people.freebsd.org/~jkim/mp_machdep.diff
It is applicable to both sys/amd64/amd64/mp_machdep.c and
sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
been used for more than a year, so it may not work at all. ;-)
Jung-uk Kim
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
> In a machine installed yesterday, 8.1-PRERELEASE doesn't
> seem to detect the number of CPU packages vs. cores per
> package correctly:
>
> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC 2010
> | [...]
> | Origin = "GenuineIntel" Id = 0x1067a Family = 6 Model = 17 Stepping = 10
> | Features=0xbfebfbff
> | Features2=0x40ce3bd
> | AMD Features=0x20000800
> | AMD Features2=0x1
> | TSC: P-state invariant
> | real memory = 34359738368 (32768 MB)
> | avail memory = 33151377408 (31615 MB)
> | ACPI APIC Table:
> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> | FreeBSD/SMP: 1 package(s) x 8 core(s)
Just for the reference, I collected CPU detection from various branches.
6.4
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
7.3
Cores per package: 4
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
8.1-rc
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s)
Indeed, looks like a regression.
--
wbr,
pluknet
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> Could you please try to do the following?
> 1. Fetch topo-12212009.tar from the top of this page:
> http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> 2. Untar it and apply this patch to the code:
> http://people.freebsd.org/~avg/cpu-topology.diff
> 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> 4. Run cpu_topology64.out and report back its output.
Ok, did that. This tool seems to get it right, i.e. it
detects 2 packages with 4 cores each. Here's the output:
Software visible enumeration in the system:
Number of logical processors visible to the OS: 8
Number of logical processors visible to this process: 8
Number of processor cores visible to this process: 8
Number of physical packages visible to this process: 2
Hierarchical counts by levels of processor topology:
# of cores in package 0 visible to this process: 4 .
# of cores in package 1 visible to this process: 4 .
Affinity masks per SMT thread, per core, per package:
Individual:
P:0, C:0, T:0 --> 1
Core-aggregated:
P:0, C:0 --> 1
Individual:
P:0, C:1, T:0 --> 2
Core-aggregated:
P:0, C:1 --> 2
Individual:
P:0, C:2, T:0 --> 4
Core-aggregated:
P:0, C:2 --> 4
Individual:
P:0, C:3, T:0 --> 8
Core-aggregated:
P:0, C:3 --> 8
Pkg-aggregated:
P:0 --> f
Individual:
P:1, C:0, T:0 --> 10
Core-aggregated:
P:1, C:0 --> 10
Individual:
P:1, C:1, T:0 --> 20
Core-aggregated:
P:1, C:1 --> 20
Individual:
P:1, C:2, T:0 --> 40
Core-aggregated:
P:1, C:2 --> 40
Individual:
P:1, C:3, T:0 --> 80
Core-aggregated:
P:1, C:3 --> 80
Pkg-aggregated:
P:1 --> f0
APIC ID listings from affinity masks
OS cpu 0, Affinity mask 0001 - apic id 0
OS cpu 1, Affinity mask 0002 - apic id 1
OS cpu 2, Affinity mask 0004 - apic id 2
OS cpu 3, Affinity mask 0008 - apic id 3
OS cpu 4, Affinity mask 0010 - apic id 4
OS cpu 5, Affinity mask 0020 - apic id 5
OS cpu 6, Affinity mask 0040 - apic id 6
OS cpu 7, Affinity mask 0080 - apic id 7
Package 0 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
L1D is Level 1 Data cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L1I is Level 1 Instruction cache, size(KBytes)= 32, Cores/cache= 1, Caches/package= 4
L2 is Level 2 Unified cache, size(KBytes)= 6144, Cores/cache= 2, Caches/package= 2
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 0| 1| 2| 3|
Core | c0| c1| c2| c3|
AffMsk| 1| 2| 4| 8|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 3 | c |
+---------+---------+
Combined socket AffinityMask= 0xf
Package 1 Cache and Thread details
Box Description:
Cache is cache level designator
Size is cache size
OScpu# is cpu # as seen by OS
Core is core#[_thread# if > 1 thread/core] inside socket
AffMsk is AffinityMask(extended hex) for core and thread
CmbMsk is Combined AffinityMask(extended hex) for hw threads sharing cache
CmbMsk will differ from AffMsk if > 1 hw_thread/cache
Extended Hex replaces trailing zeroes with 'z#'
where # is number of zeroes (so '8z5' is '0x800000')
+----+----+----+----+
Cache | L1D| L1D| L1D| L1D|
Size | 32K| 32K| 32K| 32K|
OScpu#| 4| 5| 6| 7|
Core | c0| c1| c2| c3|
AffMsk| 10| 20| 40| 80|
+----+----+----+----+
Cache | L1I| L1I| L1I| L1I|
Size | 32K| 32K| 32K| 32K|
+----+----+----+----+
Cache | L2 | L2 |
Size | 6M | 6M |
CmbMsk| 30 | c0 |
+---------+---------+
Combined socket AffinityMask= 0xf0
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"Clear perl code is better than unclear awk code; but NOTHING
comes close to unclear perl code" (taken from comp.lang.awk FAQ)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 14:58 Oliver Fromme said the following:
> Andriy Gapon wrote:
> > Could you please try to do the following?
> > 1. Fetch topo-12212009.tar from the top of this page:
> > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > 2. Untar it and apply this patch to the code:
> > http://people.freebsd.org/~avg/cpu-topology.diff
> > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > 4. Run cpu_topology64.out and report back its output.
>
> Ok, did that. This tool seems to get it right, i.e. it
> detects 2 packages with 4 cores each. Here's the output:
Great!
So perhaps you can now test jkim's patch posted in this thread?
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Sure, the kernel is being compiled right now ...
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
One Unix to rule them all, One Resolver to find them,
One IP to bring them all and in the zone to bind them.
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 14:58 Oliver Fromme said the following:
> > Andriy Gapon wrote:
> > > Could you please try to do the following?
> > > 1. Fetch topo-12212009.tar from the top of this page:
> > > http://software.intel.com/en-us/articles/intel-64-architecture-processor-topology-enumeration/
> > > 2. Untar it and apply this patch to the code:
> > > http://people.freebsd.org/~avg/cpu-topology.diff
> > > 3. Compile it by running sh mk_64.sh (supposing you have amd64 system installed)
> > > 4. Run cpu_topology64.out and report back its output.
> >
> > Ok, did that. This tool seems to get it right, i.e. it
> > detects 2 packages with 4 cores each. Here's the output:
>
> Great!
> So perhaps you can now test jkim's patch posted in this thread?
Unfortunately, it didn't change. Kernel output during boot
is still the same; it displays 1 package x 8 cores.
Best regards
Oliver
PS: "make kernel -j 10" took exactly 8 minutes on this box.
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 15:27 Oliver Fromme said the following:
> Unfortunately, it didn't change. Kernel output during boot
> is still the same; it displays 1 package x 8 cores.
If you are sure that everything is done correctly (patch really applied, kernel
really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
jkim would be interested in this issue.
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Andriy Gapon wrote:
> on 15/07/2010 15:27 Oliver Fromme said the following:
> > Unfortunately, it didn't change. Kernel output during boot
> > is still the same; it displays 1 package x 8 cores.
>
> If you are sure that everything is done correctly (patch really applied, kernel
> really rebuilt and reinstalled, and reboot was to the new kernel), then perhaps
> jkim would be interested in this issue.
Yes, I'm sure, I even added some printf() so I can be sure
that the patched code is actually executed.
Here is what happens in sys/amd64/amd64/mp_machdep.c:
In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
called. But the cpuid 0xb instruction doesn't seem to
return useful data: All values are zero already in the
first level, so cpu_cores remains 0.
Back in topo_probe(), there is a fallback if cpu_cores is
stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
which is wrong.
I patched topo_probe() so it calls topo_probe_0x4() after
topo_probe_0xb() if cpu_cores is still 0. I think this
is a better fallback procedure. With this patch, cpu_cores
gets the value 4 which is the correct one, finally:
FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
FreeBSD/SMP: 2 package(s) x 4 core(s)
This is the patch, it's against jkim's patched version:
@@ -265,7 +268,7 @@
else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
if (cpu_high >= 0xb)
topo_probe_0xb();
- else if (cpu_high >= 0x4)
+ if (cpu_high >= 0x4 && cpu_cores == 0)
topo_probe_0x4();
}
if (cpu_cores == 0)
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"With sufficient thrust, pigs fly just fine. However, this
is not necessarily a good idea. It is hard to be sure where
they are going to land, and it could be dangerous sitting
under them as they fly overhead." -- RFC 1925
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
on 15/07/2010 19:57 Oliver Fromme said the following:
> In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> called. But the cpuid 0xb instruction doesn't seem to
> return useful data: All values are zero already in the
> first level, so cpu_cores remains 0.
>
> Back in topo_probe(), there is a fallback if cpu_cores is
> stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> which is wrong.
>
> I patched topo_probe() so it calls topo_probe_0x4() after
> topo_probe_0xb() if cpu_cores is still 0. I think this
> is a better fallback procedure. With this patch, cpu_cores
> gets the value 4 which is the correct one, finally:
>
> FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> FreeBSD/SMP: 2 package(s) x 4 core(s)
Thank you for debugging this issue!
Not sure if this is the best patch that there can be, but its direction is
definitely correct.
As the Intel document says (translated to our x86 mp_machdep.c terms):
if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
otherwise we should fall back to topo_probe_0x4, etc.
I think that your addition achieves this effect, perhaps just not as explicitly as
I would preferred.
Jung-uk, what do you think?
>
> This is the patch, it's against jkim's patched version:
> @@ -265,7 +268,7 @@
> else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> if (cpu_high >= 0xb)
> topo_probe_0xb();
> - else if (cpu_high >= 0x4)
> + if (cpu_high >= 0x4 && cpu_cores == 0)
> topo_probe_0x4();
> }
> if (cpu_cores == 0)
--
Andriy Gapon
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Thursday, July 15, 2010 1:56:11 pm Andriy Gapon wrote:
> on 15/07/2010 19:57 Oliver Fromme said the following:
> > In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> > called. But the cpuid 0xb instruction doesn't seem to
> > return useful data: All values are zero already in the
> > first level, so cpu_cores remains 0.
> >
> > Back in topo_probe(), there is a fallback if cpu_cores is
> > stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> > which is wrong.
> >
> > I patched topo_probe() so it calls topo_probe_0x4() after
> > topo_probe_0xb() if cpu_cores is still 0. I think this
> > is a better fallback procedure. With this patch, cpu_cores
> > gets the value 4 which is the correct one, finally:
> >
> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > FreeBSD/SMP: 2 package(s) x 4 core(s)
>
> Thank you for debugging this issue!
> Not sure if this is the best patch that there can be, but its direction is
> definitely correct.
> As the Intel document says (translated to our x86 mp_machdep.c terms):
> if cpu_high >= 0xb then we should execute cpuid_count(0xb, 0, p) and examine EBX
> value (p[1]), only if it's non-zero should we proceed with topo_probe_0xb(),
> otherwise we should fall back to topo_probe_0x4, etc.
>
> I think that your addition achieves this effect, perhaps just not as explicitly as
> I would preferred.
Maybe have topo_probe_0xb() explicitly call topo_probe_0x4() if EBX is 0?
--
John Baldwin
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
On Thursday 15 July 2010 01:56 pm, Andriy Gapon wrote:
> on 15/07/2010 19:57 Oliver Fromme said the following:
> > In topo_probe(), cpu_high is 0xd, so topo_probe_0xb() is
> > called. But the cpuid 0xb instruction doesn't seem to
> > return useful data: All values are zero already in the
> > first level, so cpu_cores remains 0.
> >
> > Back in topo_probe(), there is a fallback if cpu_cores is
> > stil 0: It assigns mp_ncpu to cpu_cores, so it gets 8
> > which is wrong.
> >
> > I patched topo_probe() so it calls topo_probe_0x4() after
> > topo_probe_0xb() if cpu_cores is still 0. I think this
> > is a better fallback procedure. With this patch, cpu_cores
> > gets the value 4 which is the correct one, finally:
> >
> > FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
> > FreeBSD/SMP: 2 package(s) x 4 core(s)
>
> Thank you for debugging this issue!
> Not sure if this is the best patch that there can be, but its
> direction is definitely correct.
> As the Intel document says (translated to our x86 mp_machdep.c
> terms): if cpu_high >= 0xb then we should execute cpuid_count(0xb,
> 0, p) and examine EBX value (p[1]), only if it's non-zero should we
> proceed with topo_probe_0xb(), otherwise we should fall back to
> topo_probe_0x4, etc.
>
> I think that your addition achieves this effect, perhaps just not
> as explicitly as I would preferred.
>
> Jung-uk, what do you think?
Yes, you're right. Please try new patch:
http://people.freebsd.org/~jkim/mp_machdep2.diff
Thanks,
Jung-uk Kim
> > This is the patch, it's against jkim's patched version:
> > @@ -265,7 +268,7 @@
> > else if (cpu_vendor_id == CPU_VENDOR_INTEL) {
> > if (cpu_high >= 0xb)
> > topo_probe_0xb();
> > - else if (cpu_high >= 0x4)
> > + if (cpu_high >= 0x4 && cpu_cores == 0)
> > topo_probe_0x4();
> > }
> > if (cpu_cores == 0)
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jung-uk Kim wrote:
> On Thursday 15 July 2010 01:56 pm, Andriy Gapon wrote:
> > on 15/07/2010 19:57 Oliver Fromme said the following:
> > > I patched topo_probe() so it calls topo_probe_0x4() after
> > > topo_probe_0xb() if cpu_cores is still 0. I think this
> > > is a better fallback procedure. With this patch, cpu_cores
> > > gets the value 4 which is the correct one, finally:
> > [...]
> > I think that your addition achieves this effect, perhaps just not
> > as explicitly as I would preferred.
> >
> > Jung-uk, what do you think?
>
> Yes, you're right. Please try new patch:
>
> http://people.freebsd.org/~jkim/mp_machdep2.diff
Thank you!
I will have access to that particular machine on Monday again,
so testing the new patch will have to wait until Monday.
But from looking at your patch it should have the same result
as my simpler patch, so it should work fine.
Best regards
Oliver
--
Oliver Fromme, secnetix GmbH & Co. KG, Marktplatz 29, 85567 Grafing b. M.
Handelsregister: Registergericht Muenchen, HRA 74606, Geschftsfuehrung:
secnetix Verwaltungsgesellsch. mbH, Handelsregister: Registergericht Mn-
chen, HRB 125758, Geschftsfhrer: Maik Bachmann, Olaf Erb, Ralf Gebhart
FreeBSD-Dienstleistungen, -Produkte und mehr: http://www.secnetix.de/bsd
"C++ is the only current language making COBOL look good."
-- Bertrand Meyer
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
Jung-uk Kim wrote:
> On Wednesday 14 July 2010 05:40 pm, Jung-uk Kim wrote:
>> On Wednesday 14 July 2010 01:31 pm, Andriy Gapon wrote:
>>> on 14/07/2010 17:14 Oliver Fromme said the following:
>>>> In a machine installed yesterday, 8.1-PRERELEASE doesn't
>>>> seem to detect the number of CPU packages vs. cores per
>>>>
>>>> package correctly:
>>>> | FreeBSD 8.1-PRERELEASE-20100713 #0: Tue Jul 13 19:51:18 UTC
>>>> | 2010 [...]
>>>> | (2133.42-MHz K8-class CPU) Origin = "GenuineIntel" Id =
>>>> | 0x1067a Family = 6 Model = 17 Stepping = 10
>>>> | Features=0xbfebfbff
>>>> |SE
>>>> | P,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,
>>>> |SSE 2,SS,HTT,TM,PBE>
>>>> | Features2=0x40ce3bd
>>>> |,C X16,xTPR,PDCM,DCA,SSE4.1,XSAVE> AMD
>>>> | Features=0x20000800
>>>> | AMD Features2=0x1
>>>> | TSC: P-state invariant
>>>> | real memory = 34359738368 (32768 MB)
>>>> | avail memory = 33151377408 (31615 MB)
>>>> | ACPI APIC Table:
>>>> | FreeBSD/SMP: Multiprocessor System Detected: 8 CPUs
>>>> | FreeBSD/SMP: 1 package(s) x 8 core(s)
>>>> | cpu0 (BSP): APIC ID: 0
>>>> | cpu1 (AP): APIC ID: 1
>>>> | cpu2 (AP): APIC ID: 2
>>>> | cpu3 (AP): APIC ID: 3
>>>> | cpu4 (AP): APIC ID: 4
>>>> | cpu5 (AP): APIC ID: 5
>>>> | cpu6 (AP): APIC ID: 6
>>>> | cpu7 (AP): APIC ID: 7
>>>> | ioapic1 irqs 24-47 on motherboard
>>>> | ioapic0 irqs 0-23 on motherboard
>>>>
>>>> I'm pretty sure that this is a 2 x 4 machine (2 CPU packages
>>>> with 4 cores per package), not 1 x 8. That's what the BIOS
>>>> displays during POST.
>>>>
>>>> I'm not sure if this is just a "cosmetic" issue, or if this
>>>> is a critical thing ... I could imagine that performance
>>>> might be sub-optimal if the CPU topology isn't detected
>>>> correctly, but I'm not sure if FreeBSD can take advantage
>>>> of the topology.
>>> Could you please try to do the following?
>>> 1. Fetch topo-12212009.tar from the top of this page:
>>> http://software.intel.com/en-us/articles/intel-64-architecture-pr
>>> oc essor-topology-enumeration/ 2. Untar it and apply this patch to
>>> the code:
>>> http://people.freebsd.org/~avg/cpu-topology.diff
>>> 3. Compile it by running sh mk_64.sh (supposing you have amd64
>>> system installed) 4. Run cpu_topology64.out and report back its
>>> output.
>> It's funny that I actually wrote a convenience script (and cleaned
>> up today):
>>
>> http://people.freebsd.org/~jkim/cpu_topology-12212009.sh
>>
>> BTW, current topology detection code is not optimal for some Intel
>> processors if my memory serves.
>
> Surprisingly, I found a patch I wrote last year from /tmp of my
> desktop and it is still applied cleanly. 8-)
>
> Just in case, it is available from here:
>
> http://people.freebsd.org/~jkim/mp_machdep.diff
>
> It is applicable to both sys/amd64/amd64/mp_machdep.c and
> sys/i386/i386/mp_machdep.c. I have to warn you, though, it hasn't
> been used for more than a year, so it may not work at all. ;-)
>
> Jung-uk Kim
Do you have patch for i386 branch ? I want to test.
On my Pentium-D machine:
$ sysctl kern.sched.topology_spec
kern.sched.topology_spec:
0, 1
0, 1
it seems the kernel thinks that the Pentuim-D is sharing L2 cache,
but in fact, the design of the Pentium Ds was simply two P4 cores
sitting side by side. They do not share anything and they basically work
independently.
Regards,
David Xu
_______________________________________________
___________________________________________________
Posted on the Freebsd-stable mailing list. Go to http://lists.freebsd.org/mailman/listinfo/freebsd-stable to subscribe.
|
NewsArc Lists
| Culture Pages
| Computing Archive
| Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site:
|
|