在Pentium(R) Dual-Core CPU E5200的机器上,原始版本的linux是CentOS 5.4, 编译的linux版本是2.6.18.8 编译时选项:Processor type and features->preemption Model选择的是preemptible Kernel 以检测每个threadinfo结构中preempt_count的数目 编译成功后进入新系统,insmod打印preempt_count的模块,主体大概如下: struct task_struct *p; for (i = 1; i <= LOOP; i++){ for_each_p...
by 迷失的猫咪 - 内核源码 - 2011-11-29 21:21:27 阅读(6074) 回复(12)
如何保证对preempt_count里面的各个计数器的操作不互相干扰? 不会因为把一个减为负时候,相邻的计数器被削减? 另外通常说不可以在一个cpu的中断中交错的执行可延迟函数,其实就是意味着在中断处理函数的do_irq中不可以随便的使用__local_bh_enble()。请问一下各位在使用local_bh_disable()和local_bh_enable()的一些约定,一般是在哪里使用他们,还有哪些需要主意的地方? [ 本帖最后由 ahhhhwang 于 2007-12-28 15:24 编辑 ]
在man sched_setscheduler中看到: From kernel version 2.6.18 onwards, however, Linux is gradually becoming equipped with real-time capabilities, most of which are derived from the former realtime-preempt patches developed by Ingo Molnar, Thomas Gleixner, Steven Rostedt, and others. Until the patches have been completely merged into the mainline kernel (this is expected to be ar...
請問有人看過類似的問題嗎?? 我通常是telnet連上之後比較容易reproduce. 我用的是Linux 2.6.28.7 CPU:arm-926ejs 謝謝 ------------[ cut here ]------------ WARNING: at kernel/sched.c:4320 add_preempt_count+0x88/0x9c() Modules linked in: aess_video bonding g_mass_storage g_kbdmouse g_se_pilot2_udc g_se_pilot2_udc_usb1_1 g_composite ssp_doorbell aess_pwmdrv aess_fansensordrv aess_cryptodrv aess_adcsensord...
我在看
spin_lock锁中使用了preempt 请问这个可抢占 到底在哪种情况下真正有效呢? IRQ中断?exception?系统调用?还是下半部软中断呢?
各位,我对preempt_disable加barrier()的方式不理解,preempt_disable需要控制指令的执行顺序,这个容易理解。比如 preempt_disable(); a++; preempt_enable(); 如果不控制的话,a++可能在抢占被禁用之前就执行,使preempt_disable失去意义。但是内核的实现怎么只用一个barrier(),这个只能控制编译器不乱序吧,如果cpu乱序执行怎么办? 望大侠指点。 附上preempt_disable的代码: 30 #define preempt_disable() \ 31 do { \ 32...
InnoDB Row counting using Indexes This is always mentioned that InnoDB is slower in giving results for count(*) as compared to MyISAM. But as Peter points out in his blog that this fact only applies to count(*) queries without WHERE clause. This text is from Peter's blog only - "If you have query like SELECT count(*) FROM IMAGE WHERE USER_ID=5 this query will be executed same way both for M...