Redian新闻
>
why find_vpid() need a rcu_lock() ?
avatar
why find_vpid() need a rcu_lock() ?# Linux - Linux 操作系统
l*g
1
我真是没有自知之明。 投稿了,等着据那。
投完了,人家都懒的理我。
avatar
l*i
2
avatar
w*s
3
almost each place of find_vpid, there's a rcu_lock, why's that ?
avatar
n*t
4
你说的是rcu_read_lock吧。

【在 w*s 的大作中提到】
: almost each place of find_vpid, there's a rcu_lock, why's that ?
avatar
w*s
5
yes, you are right.
拿个小板凳听大师讲讲。。。

【在 n******t 的大作中提到】
: 你说的是rcu_read_lock吧。
avatar
n*t
6
pid是放在全局的pid_hash 这个数据结构里面的,这个东西用rcu机制来做同步,find_
vpid,作为rcu的reader,肯定需要用rcu_read_lock 和rcu_read_unlock了,从调用方式
上来说和 mark临界区没什么区别了。

【在 w*s 的大作中提到】
: yes, you are right.
: 拿个小板凳听大师讲讲。。。

avatar
w*s
7
i used rcu_read_lock() to protect find_vpid in ISR,
crashes inside find_vpid.
then i use spin_lock_irq_save() around it, still same crashes.
now i'm crashing.
Any hints why this is happening ?

find_

【在 n******t 的大作中提到】
: pid是放在全局的pid_hash 这个数据结构里面的,这个东西用rcu机制来做同步,find_
: vpid,作为rcu的reader,肯定需要用rcu_read_lock 和rcu_read_unlock了,从调用方式
: 上来说和 mark临界区没什么区别了。

avatar
n*t
8
does not look like that should cause crashing, did you do any modification t
o the pid table in the ISR?
However, I am wondering why you want to traverse a hlist in the ISR,
usually that should be delayed and ISRs are only used to do very simple task
s.

【在 w*s 的大作中提到】
: i used rcu_read_lock() to protect find_vpid in ISR,
: crashes inside find_vpid.
: then i use spin_lock_irq_save() around it, still same crashes.
: now i'm crashing.
: Any hints why this is happening ?
:
: find_

avatar
w*s
9
no i don't change pid table.
yes if i get ride of that find_vpid in ISR, it works fine now.
so might be the delay causing issues, when there're too many interrupts.

t
task

【在 n******t 的大作中提到】
: does not look like that should cause crashing, did you do any modification t
: o the pid table in the ISR?
: However, I am wondering why you want to traverse a hlist in the ISR,
: usually that should be delayed and ISRs are only used to do very simple task
: s.

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。