標(biāo)題: BKL 究竟用在什么時候 vfs里面的readdir 需要嗎 [打印本頁] 作者: viton_xuan 時間: 2006-11-10 14:06 標(biāo)題: BKL 究竟用在什么時候 vfs里面的readdir 需要嗎 有兩個問題求教
一 BKL(Big kernel lock )
看 2.6.9 內(nèi)核
"include/linux/fs.h" 里面對file_operations前有段說明
/*
* NOTE:
* read, write, poll, fsync, readv, writev can be called
* without the big kernel lock held in all filesystems.
*/
意思是除他提到的幾個外, 其他的有可能要調(diào)用 BKL
而在 "Documentation/filesystems/Locking"里對file_operations的說明
locking rules:
All except ->poll() may block.
BKL
llseek: no (see below)
read: no
aio_read: no
write: no
aio_write: no
readdir: no
poll: no
ioctl: yes (see below)
mmap: no
open: maybe (see below)
flush: no
release: no
fsync: no (see below)
aio_fsync: no
fasync: yes (see below)
lock: yes
readv: no
writev: no
sendfile: no
sendpage: no
get_unmapped_area: no
check_flags: no
dir_notify: no