免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 772 | 回复: 5
打印 上一主题 下一主题

cpuinfo incorrectly includes 'ht' flag [复制链接]

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-04-28 22:46 |只看该作者 |倒序浏览
Hi,

my cpuinfo includes the 'ht' flag, although I do not have a processor
with Hyper Threading, nor a kernel supporting this. How come?

$ cat /proc/cpuinfo
processor        : 0
vendor_id        : GenuineIntel
cpu family        : 15
model                : 2
model name        : Intel(R) Pentium(R) 4 CPU 2.80GHz
stepping        : 9
cpu MHz                : 2793.374
cache size        : 512 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 pbe cid
bogomips        : 5521.40
$ uname -a
Linux topjaklont.student.utwente.nl 2.6.5 #3 Thu Apr 22 19:00:30 CEST 2004 i686 i686 i386 GNU/Linux

yours,
Gerrit.

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
2 [报告]
发表于 2004-04-28 22:47 |只看该作者

cpuinfo incorrectly includes 'ht' flag

processor       : 0
vendor_id       : GenuineIntel
cpu family      : 15
model           : 1
model name      : Intel(R) Pentium(R) 4 CPU 1.80GHz
stepping        : 3
cpu MHz         : 1792.745
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 sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm
bogomips        : 3578.26

这是我的。

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
3 [报告]
发表于 2004-04-28 22:48 |只看该作者

cpuinfo incorrectly includes 'ht' flag

I think you have to search quite hard to find an Intel processor that _doesn't_
support HT nowadays. Yours says it does in the capabilities bits (which is
what's decoded as the flags field here). You can also check the output from
dmesg where it puts out the processor capabilities bitmask as 4 bytes of hex.
You can then look at the bit settings yourself and compare them with the
documented return from the cpuid instruction.

Ah, the Intel "IA-32 Intel architecture software developer's manual: vol 3:
system programming guide" (25366813.pdf) says that after issuing a cpuid
instruction with EAX=1

"The Hyperthreading technology feature flag (bit 28 in EDX) indicates (when set)
that the processor is capable of supporting HT technology.

Bits 16 through 23 in the EBX register indicate the number of logical processors
supported within the physical package.

It is possible to have the CPUID feature flag set indicating a processor is
capable of supporting HT technology when only one logical processor is available
in the package. In this case bits 16 through 23 in the EBX register will have a
value of 1."

这是解答。

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
4 [报告]
发表于 2004-04-28 22:52 |只看该作者

cpuinfo incorrectly includes 'ht' flag

Initializing CPU#0
Detected 1792.745 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 3578.26 BogoMIPS
Memory: 708552k/720832k available (1503k kernel code, 11892k reserved, 1110k data, 136k init, 0k highmem)
Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
Inode cache hash table entries: 65536 (order: 7, 524288 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer cache hash table entries: 65536 (order: 6, 262144 bytes)
Page-cache hash table entries: 262144 (order: 8, 1048576 bytes)
CPU: Trace cache: 12K uops, L1 D cache: 8K
CPU: L2 cache: 256K
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU:     After generic, caps: 3febf9ff 00000000 00000000 00000000
CPU:             Common caps: 3febf9ff 00000000 00000000 00000000

CPU: Intel(R) Pentium(R) 4 CPU 1.80GHz stepping 03
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: Intel
ACPI: Subsystem revision 20031002

解答中所说的It is possible to have the CPUID feature flag set indicating a processor is
capable of supporting HT technology when only one logical processor is available
in the package. In this case bits 16 through 23 in the EBX register will have a
value of 1.其中的EBX register是不是红色部分之中的?但是我没有发现有值等于1啊?那我的flag里面还有ht?

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
5 [报告]
发表于 2004-04-28 22:56 |只看该作者

cpuinfo incorrectly includes 'ht' flag

dmesg里面4bytes的和cpu有关的就这两行了吧?其他的没有啊?何解啊?

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
6 [报告]
发表于 2004-04-29 18:45 |只看该作者

cpuinfo incorrectly includes 'ht' flag

EAX,EBX,EDX不都是寄存器吗?可以用指令修改值的啊,那么文中所说的那些值是在什么时候读取的呢?好晕。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP