免费注册 查看新帖 |

Chinaunix

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

【求助】问下s3c2440的相关问题! [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-11-05 09:19 |只看该作者 |倒序浏览
最近在用华恒的s3c2440开发板跑程序,由于是跑视频ip包转发(26Mbps左右的码流输入,拆包,重新封装转发),感觉17Mbps左右就是极限了,是不是2440的极限就是这么多?

另,2440到底有多少mips?理论上400Mhz x 1.1应该有440mips啊,怎么实际看下来才200多?

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
2 [报告]
发表于 2009-11-05 09:26 |只看该作者
BogoMIPS和你的实际的MHz频率是1/2的关系
你可以多找几个芯片试试


  1. [liuqi@localhost linux-2.6]$ cat /proc/cpuinfo
  2. processor        : 0
  3. vendor_id        : GenuineIntel
  4. cpu family        : 6
  5. model                : 23
  6. model name        : Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz
  7. stepping        : 10
  8. cpu MHz                : 800.000
  9. cache size        : 3072 KB
  10. physical id        : 0
  11. siblings        : 2
  12. core id                : 0
  13. cpu cores        : 2
  14. apicid                : 0
  15. initial apicid        : 0
  16. fdiv_bug        : no
  17. hlt_bug                : no
  18. f00f_bug        : no
  19. coma_bug        : no
  20. fpu                : yes
  21. fpu_exception        : yes
  22. cpuid level        : 13
  23. wp                : yes
  24. flags                : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm ida
  25. bogomips        : 4521.93
  26. clflush size        : 64
  27. power management:

  28. processor        : 1
  29. vendor_id        : GenuineIntel
  30. cpu family        : 6
  31. model                : 23
  32. model name        : Intel(R) Core(TM)2 Duo CPU     P8400  @ 2.26GHz
  33. stepping        : 10
  34. cpu MHz                : 800.000
  35. cache size        : 3072 KB
  36. physical id        : 0
  37. siblings        : 2
  38. core id                : 1
  39. cpu cores        : 2
  40. apicid                : 1
  41. initial apicid        : 1
  42. fdiv_bug        : no
  43. hlt_bug                : no
  44. f00f_bug        : no
  45. coma_bug        : no
  46. fpu                : yes
  47. fpu_exception        : yes
  48. cpuid level        : 13
  49. wp                : yes
  50. flags                : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe nx lm constant_tsc arch_perfmon pebs bts pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr sse4_1 lahf_lm ida
  51. bogomips        : 4521.76
  52. clflush size        : 64
  53. power management:

复制代码


intel的P8400的bogomips也就是4521.76这么多

1 BogoMips的来源
  在linux和uClinux启动过程中,我们通常可以看到以下语句:Calibrating delay loop... xxxx BogoMIPS。其中Calibrate的意思是校准, 进入时延校准循环;Bogo是Bogus(伪)的意思;MIPS是每秒百万条指令。这里是对CPU进行一个实时测试,来得到一个大体的MIPS数值。
  2 BogoMips的涵义
  Bogomips(读作bogumips)是Linux操作系统中衡量计算机处理器运行速度的的一种尺度,而提供这种度量的程序也被称为BogoMips,是由Linux主要开发者linus Torvalds写的。
  当启动计算机时,BogoMips能显示系统选项是否处于最佳性能。你可以将计算机的 bogomips与计算机处理器的bogomips进行比较。Torvalds称这个程序为BogoMips来暗示两台计算机间的性能度量是错误的,因为并非所有起作用因素都能被显示出来或被认可。尽管计算机基准中经常用到MIPS,但环境的变化容易导致度量的错误。
  3 BogoMips的计算
  Bogomips能测出一秒钟内某程序运行了多少次。其实,BogoMips的过程就是一个简单计数循环,看ls可以循环多少次,然后除以500000就得到了BogoMips的数值 
  4 BogoMips的应用
  一些版本的Linux带有BogoMIPS,也可以通过网站进行下载。2004年7月,一个自称为黑客的网站Wintermute显示了装有AMD Athlon 1792MHz CPU的服务器已经达到3578.26bogomips。



其代码如下:


  1.     10        #include <linux/linkage.h>
  2.     11        #include <asm/assembler.h>
  3.     12        #include <asm/param.h>
  4.     13                        .text
  5.     14       
  6.     15        .LC0:                .word        loops_per_jiffy
  7.     16        .LC1:                .word        (2199023*HZ)>>11
  8.     17       
  9.     18        /*
  10.     19         * r0  <= 2000
  11.     20         * lpj <= 0x01ffffff (max. 3355 bogomips)
  12.     21         * HZ  <= 1000
  13.     22         */
  14.     23       
  15.     24        ENTRY(__udelay)
  16.     25                        ldr        r2, .LC1
  17.     26                        mul        r0, r2, r0
  18.     27        ENTRY(__const_udelay)                                @ 0 <= r0 <= 0x7fffff06
  19.     28                        ldr        r2, .LC0
  20.     29                        ldr        r2, [r2]                @ max = 0x01ffffff
  21.     30                        mov        r0, r0, lsr #14                @ max = 0x0001ffff
  22.     31                        mov        r2, r2, lsr #10                @ max = 0x00007fff
  23.     32                        mul        r0, r2, r0                @ max = 2^32-1
  24.     33                        movs        r0, r0, lsr #6
  25.     34                        moveq        pc, lr
  26.     35       
  27.     36        /*
  28.     37         * loops = r0 * HZ * loops_per_jiffy / 1000000
  29.     38         *
  30.     39         * Oh, if only we had a cycle counter...
  31.     40         */
  32.     41       
  33.     42        @ Delay routine
  34.     43        ENTRY(__delay)
  35.     44                        subs        r0, r0, #1
  36.     45        #if 0
  37.     46                        movls        pc, lr
  38.     47                        subs        r0, r0, #1
  39.     48                        movls        pc, lr
  40.     49                        subs        r0, r0, #1
  41.     50                        movls        pc, lr
  42.     51                        subs        r0, r0, #1
  43.     52                        movls        pc, lr
  44.     53                        subs        r0, r0, #1
  45.     54                        movls        pc, lr
  46.     55                        subs        r0, r0, #1
  47.     56                        movls        pc, lr
  48.     57                        subs        r0, r0, #1
  49.     58                        movls        pc, lr
  50.     59                        subs        r0, r0, #1
  51.     60        #endif
  52.     61                        bhi        __delay
  53.     62                        mov        pc, lr
  54.     63        ENDPROC(__udelay)
  55.     64        ENDPROC(__const_udelay)
  56.     65        ENDPROC(__delay)
复制代码

[ 本帖最后由 T-Bagwell 于 2009-11-5 09:42 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2009-11-05 11:02 |只看该作者
感谢版主,这么说来主要是处理器性能问题?

另,P8400 测下来怎么这么点,网上查了下说有17684mips啊...

论坛徽章:
5
摩羯座
日期:2014-07-22 09:03:552015元宵节徽章
日期:2015-03-06 15:50:392015亚冠之大阪钢巴
日期:2015-06-12 16:01:352015年中国系统架构师大会
日期:2015-06-29 16:11:2815-16赛季CBA联赛之四川
日期:2018-12-17 14:10:21
4 [报告]
发表于 2009-11-05 11:16 |只看该作者
原帖由 talient0918 于 2009-11-5 11:02 发表
感谢版主,这么说来主要是处理器性能问题?

另,P8400 测下来怎么这么点,网上查了下说有17684mips啊...


主要是在


  1.    64        static int show_cpuinfo(struct seq_file *m, void *v)
  2.     65        {
  3.     66                struct cpuinfo_x86 *c = v;
  4.     67                unsigned int cpu = 0;
  5.     68                int i;
  6.     69       
  7.     70        #ifdef CONFIG_SMP
  8.     71                cpu = c->cpu_index;
  9.     72        #endif
  10.     73                seq_printf(m, "processor\t: %u\n"
  11.     74                           "vendor_id\t: %s\n"
  12.     75                           "cpu family\t: %d\n"
  13.     76                           "model\t\t: %u\n"
  14.     77                           "model name\t: %s\n",
  15.     78                           cpu,
  16.     79                           c->x86_vendor_id[0] ? c->x86_vendor_id : "unknown",
  17.     80                           c->x86,
  18.     81                           c->x86_model,
  19.     82                           c->x86_model_id[0] ? c->x86_model_id : "unknown");
  20.     83       
  21.     84                if (c->x86_mask || c->cpuid_level >= 0)
  22.     85                        seq_printf(m, "stepping\t: %d\n", c->x86_mask);
  23.     86                else
  24.     87                        seq_printf(m, "stepping\t: unknown\n");
  25.     88       
  26.     89                if (cpu_has(c, X86_FEATURE_TSC)) {
  27.     90                        unsigned int freq = cpufreq_quick_get(cpu);
  28.     91       
  29.     92                        if (!freq)
  30.     93                                freq = cpu_khz;
  31.     94                        seq_printf(m, "cpu MHz\t\t: %u.%03u\n",
  32.     95                                   freq / 1000, (freq % 1000));
  33.     96                }
  34.     97       
  35.     98                /* Cache size */
  36.     99                if (c->x86_cache_size >= 0)
  37.    100                        seq_printf(m, "cache size\t: %d KB\n", c->x86_cache_size);
  38.    101       
  39.    102                show_cpuinfo_core(m, c, cpu);
  40.    103                show_cpuinfo_misc(m, c);
  41.    104       
  42.    105                seq_printf(m, "flags\t\t:");
  43.    106                for (i = 0; i < 32*NCAPINTS; i++)
  44.    107                        if (cpu_has(c, i) && x86_cap_flags[i] != NULL)
  45.    108                                seq_printf(m, " %s", x86_cap_flags[i]);
  46.    109       
  47.    110                seq_printf(m, "\nbogomips\t: %lu.%02lu\n",
  48.    111                           c->loops_per_jiffy/(500000/HZ),
  49.    112                           (c->loops_per_jiffy/(5000/HZ)) % 100);
  50.    113       
  51.    114        #ifdef CONFIG_X86_64
  52.    115                if (c->x86_tlbsize > 0)
  53.    116                        seq_printf(m, "TLB size\t: %d 4K pages\n", c->x86_tlbsize);
  54.    117        #endif
  55.    118                seq_printf(m, "clflush size\t: %u\n", c->x86_clflush_size);
  56.    119                seq_printf(m, "cache_alignment\t: %d\n", c->x86_cache_alignment);
  57.    120                seq_printf(m, "address sizes\t: %u bits physical, %u bits virtual\n",
  58.    121                           c->x86_phys_bits, c->x86_virt_bits);
  59.    122       
  60.    123                seq_printf(m, "power management:");
  61.    124                for (i = 0; i < 32; i++) {
  62.    125                        if (c->x86_power & (1 << i)) {
  63.    126                                if (i < ARRAY_SIZE(x86_power_flags) &&
  64.    127                                    x86_power_flags[i])
  65.    128                                        seq_printf(m, "%s%s",
  66.    129                                                   x86_power_flags[i][0] ? " " : "",
  67.    130                                                   x86_power_flags[i]);
  68.    131                                else
  69.    132                                        seq_printf(m, " [%d]", i);
  70.    133                        }
  71.    134                }
  72.    135       
  73.    136                seq_printf(m, "\n\n");
  74.    137       
  75.    138                return 0;
  76.    139        }

复制代码


里面计算出来的

论坛徽章:
0
5 [报告]
发表于 2009-11-05 11:22 |只看该作者
http://en.wikipedia.org/wiki/BogoMIPS
根据这个来说不全是1/2的关系
With the 2.2.14 Linux kernel, a caching setting of the CPU state was moved from behind to before the BogoMips calculation. Although the BogoMips algorithm itself wasn't changed, from that kernel onward the BogoMips rating for then current Pentium CPUs was twice that of the rating before the change. The changed BogoMips outcome had no effect on real processor performance.

评分

参与人数 1可用积分 +30 收起 理由
T-Bagwell + 30 我很赞同

查看全部评分

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP