|

楼主 |
发表于 2003-5-30 01:45:03
|
显示全部楼层
转一个有关HT的小文章。
Linux* Issues with Hyper-Threaded Technology
For Linux to make use of HT Technology an SMP kernel must be installed. This is confirmed by the output of uname -a, which shows the kernel version ending in SMP. The output of cat /proc/cpuinfo (see below) will show the number of CPU's and their properties. HT Technology is shown by the presence of the ht flag. If the computer BIOS supports SMP (or an analogous option is activated in BIOS), the machine can be used as an SMP system with Linux. When the SMP kernel is installed, it will seem as if double the physical processors are available. At present the errata kernels 2.4.9-21 and 2.4.9-31 have HT Technology support, but you have to pass "acpismp=force" on the kernel command line to enable it.
- > $cat /proc/cpuinfo
- > processor : 0
- > vendor_id : GenuineIntel
- > cpu family : 15
- > model : 1
- > model name : Intel(R) Pentium(R) 4 CPU 1.70GHz
- > stepping : 2
- > cpu MHz : 1694.907
- > cache size : 256 KB
- > fdiv_bug : no
- > hlt_bug : no
- > f00f_bug : no
- > coma_bug : no
- > fpu : yes
- > fpu_exception : yes
- > cpuid level : 2
- > wp : yes
- > flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge
- > mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
- > bogomips : 3381.65
- >
复制代码
The Linux 2.4 kernel will not be developed to take an active advantage of HT Technology and patches may be required to fix some possible problems. Rusty Russell (a Linux developer) mentions: "The hyperthreading issue... is likely to throw a new set of complications into the mix. A processor which does hyperthreading looks like two independent CPUs, but it [processes] should not be scheduled [by the scheduler] as such - it is better to divide process across real (hardware) processors first."
Work is underway in the Linux community to add HT Technology patches to the 2.4 release of the Linux kernel. HT Technology changes to Linux are being exploited by Carrier Grade Linux Change Project under the ODSL (see below). HT Technology offers performance enhancement potentials that are a prime requirement of the carrier grade environment. Active utilization of HT Technology will likely appear in the standard 2.5 Linux kernel, although it has not yet been placed into the development queue due to prerequisite work being done.
Linux HT Technology Capable Compilers
The Intel Linux C++ Compiler 6.0 has increased levels of Linux and industry standards support that provide improved compatibility with GNU C, broader support of Linux distributions, support for the C++ ABI object model and GNU inline ASM for IA32. - The Intel C++ Compiler supports OpenMP API version 1.0 and performs code transformation for shared memory parallel programming. The Intel compiler supports multi-threaded application development and debugging, with support for OpenMP 1.0 for C and new support for OpenMP 1.0 for C++. This makes it fully capable of designing HT Technology enabled applications on HT Technology enabled hardware. |
|