函数逻辑报告 |
Source Code:mm\filemap.c |
Create Date:2022-07-27 15:24:23 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:wait_on_page_bit_common
函数原型:static inline int wait_on_page_bit_common(wait_queue_head_t *q, struct page *page, int bit_nr, int state, enum behavior behavior)
返回类型:int
参数:
类型 | 参数 | 名称 |
---|---|---|
wait_queue_head_t * | q | |
struct page * | page | |
int | bit_nr | |
int | state | |
enum behavior | behavior |
1137 | bool thrashing = false |
1138 | bool delayacct = false |
1140 | ret等于0 |
1142 | 如果bit_nr恒等于PG_locked且非PageUptodate(page)且PageWorkingset(page)则 |
1144 | 如果非PageSwapBacked(page)则 |
1145 | delayacct_thrashing_start() |
1146 | delayacct = true |
1148 | psi_memstall_enter( & pflags) |
1149 | thrashing = true |
1153 | flags等于如果behavior恒等于Hold ref to page and take the bit when woken, like* __lock_page() waiting on then setting PG_locked.则wait_queue_entry::flags 否则0 |
1154 | func等于wake_page_function |
1158 | 循环 |
1159 | spin_lock_irq( & lock) |
1161 | 如果此条件成立可能性大(为编译器优化)(链表为空)则 |
1162 | __add_wait_queue_entry_tail(q, wait) |
1163 | SetPageWaiters(page) |
1166 | set_current_state(state) |
1168 | spin_unlock_irq( & lock) |
1170 | bit_is_set等于st_bit - Determine whether a bit is set*@nr: bit number to test*@addr: Address to start counting from |
1171 | 如果behavior恒等于Drop ref to page before wait, no check when woken,* like put_and_wait_on_page_locked() on PG_locked.则put_page(page) |
1174 | 如果此条件成立可能性大(为编译器优化)(bit_is_set)则io_schedule() |
1185 | 如果signal_pending_state(state, 当前进程)则 |
1198 | 退出 |
1204 | 如果thrashing则 |
1205 | 如果delayacct则delayacct_thrashing_end() |
1207 | psi_memstall_leave( & pflags) |
1218 | 返回:ret |
名称 | 描述 |
---|---|
wait_on_page_bit | |
wait_on_page_bit_killable | |
put_and_wait_on_page_locked | put_and_wait_on_page_locked - Drop a reference and wait for it to be unlocked*@page: The page to wait for |
__lock_page | __lock_page - get a lock on the page, assuming we need to sleep to get it*@__page: the page to lock |
__lock_page_killable |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |