kernel/rcutree.c
rcu_check_callbacks ->
s3c2410_timer_interrupt -》 timer_tick -》update_process_times -》 rcu_check_callbacks ->
__rcu_pending-> print_other_cpu_stall
在时钟中断中进行检查
INFO: RCU detected CPU stalls:
使用注意方式:
RCU 保护的代码里面不能进入睡眠状态
受访问的资源必须通过指针访问
RCU 使用方式:
1. 读操作时 引用指针必须使用rcu_dereference(ptr)
2. 受访问的资源必须通过指针访问
3. 修改ptr 指向的对象时 必须调用 rcu_assign_pointer
参考资料:
linux内核 RCU机制详解 讲到 rcu 调用使用方法。
http://blog.youkuaiyun.com/xabc3000/article/details/15335131
https://www.kernel.org/doc/Documentation/RCU/stallwarn.txt
http://blog.chinaunix.net/uid-24517893-id-2381246.html
本文详细介绍了Linux内核中的RCU(Read-Copy-Update)机制,包括其核心概念、工作原理、使用方式以及注意事项。重点阐述了在时钟中断中进行检查的方法,并提供了相关链接供进一步学习。
2188

被折叠的 条评论
为什么被折叠?



