Intelの論理 CPU 数はハードウェア的な制約に縛られており,次世代割り込み機構で到達可能なのは高々 256 プロセッサ

Windows 7/Windows Server 2008 R2 が 256 プロセッサまでしか "対応" しない理由を予想する - NyaRuRuの日記

最大CPU数が4096、最大ノード数が512まで拡大されました。

Linux Kernel Watch 2008年10月

Windows7 の 256 プロセッサ対応は全然負けてるねw

2008/11/04 : てれもえ! -照れこそは萌えが戴くべき最高の至宝-

x86の最大CPU数、最大ノード数が拡大

最大CPU数が4096、最大ノード数が512まで拡大されました。当面はSGIx86_64スパコンくらいでしか意味がなさそうですが、カーネルデベロッパーから見ると、事実上、cpumask_t変数をスタックに置くことが全面禁止になってしまったことを意味します(スタックが4Kbytesしかないのに、1変数あたり512bytesの変数を置くなんて……)

Linux Kernel Watch 2008年10月

そういえば,昨晩の WinHEC 2008 2日目のキーノートで,Windows Server 2008 R2 を使った 256 CPUs デモが行われていた.

デモは 37 分辺りから始まる.HP の Itanium サーバで,64 物理CPU × 2 (Core/物理CPU) × 2 (論理CPU/Core) の 256 論理 CPU だそうだ.詳しくは以下の transcript を参照されたい.

BILL LAING: What about Itanium? This system here is an HP system. Itanium is supported in Windows Server 2008 R2, and we've really focused our support on Itanium for these large-scale database workloads. We also have other features, such as dynamic hardware partitioning, also available with this kind of system. Our great partnership with HP, as I mentioned before, has enabled us to scale up to 256 logical processors in the Itanium Edition.

So this system you see here, the two cabinets, is the 64 processors, each processor has two cores, and each core has two threads. So that gives us 64 times 2, times 2, which is 256. So 256 logical processors, it also supports up to two terabytes of main memory. So if you thought the task manager with 192 cores looked busy, let's have a look at the superdome console. So now we're seeing the 256 processors, but I think we need a bigger screen. Maybe we'll ask for this one next time, right.

QUENTIN CLARK: You'll have to make every IT administrative console abut 20-feet wide.

Bill Laing: WinHEC 2008 Day 2 Keynote

ちなみにタスクマネージャはこんな感じになっていた.

仮に 4096 プロセッサに "対応" するとしたら,タスクマネージャも抜本的に手を入れる必要がありそうだ.

タスクマネージャwww

さて,Windows 7/Windows Server 2008 R2 が 256 プロセッサより多くのプロセッサに "対応" しない理由は何だろうか?

これは推測するしかないが,そのひとつは検証可能性と考えられる.

Mark Russinovich は,64-bit Windows Server 2008 Datacenter が "サポート" する最大メモリ量が 2TB である理由として,それが Microsoft でテスト可能な最大値だったからと述べている.

The maximum 2TB limit of 64-bit Windows Server 2008 Datacenter doesn't come from any implementation or hardware limitation, but Microsoft will only support configurations they can test.

As of the release of Windows Server 2008, the largest system available anywhere was 2TB and so Windows caps its use of physical memory there.

Pushing the Limits of Windows: Physical Memory : Mark’s Blog

どうやら Microsoft は自社でテストできていないサイズのメモリ構成を "サポート" する気がなく,恐らくこれは CPU についても当てはまるだろう.そして 256 プロセッサは上記デモのように既に実機動作が行われており,次期 OS 出荷までにそのテストが終了すれば,Microsoft はきっと Windows 7/Windows Server 2008 R2 で 256 プロセッサを "サポート" するだろう.

それでは 256 論理 CPU を超える構成のハードウェアがすぐに出荷される可能性はないのだろうか?

これに関しては,PDC 2008 のセッションにヒントがあった.

Interrupt Addressing
  • xAPIC has been meeting interrupt architecture needs since P4, for Intel Architecture
    • 8 bit APIC ID addresses
    • Physical addresses limited to 0 ? 254 APIC IDs
    • Logical addresses limited to 60 processors
    • Flat addresses limited to 8 processors
  • Nehalem processors require 16 APIC IDs per socket for 8 processors
    • Interrupt addressing strained on Nehalem platforms
    • xAPIC can address only up to 8 socket Nehalem
    • Only 128 processors
  • Next Generation Interrupt Architecture allows scaling to 256 processors on Nehalem platforms
Developing Applications for More Than 64 Logical Processors in Windows Server 2008 R2

つまり,(Intel の) 論理 CPU 数はハードウェア的な制約に縛られており,Intel の次世代割り込み機構で到達可能なのが高々 256 プロセッサということらしい.

先ほどの検証可能性の仮定と合わせて考えると,Windows が 256 より多くのプロセッサに "対応" するのには,まだしばらく時間がかかると言えそうだ.