Function report |
Source Code:mm\filemap.c |
Create Date:2022-07-28 14:01:33 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:wait_on_page_bit_common
Proto:static inline int wait_on_page_bit_common(wait_queue_head_t *q, struct page *page, int bit_nr, int state, enum behavior behavior)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
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 | If bit_nr == PG_locked && Not PageUptodate(page) && PageWorkingset(page) Then |
1144 | If Not PageSwapBacked(page) Then |
1145 | delayacct_thrashing_start() |
1146 | delayacct = true |
1148 | psi_memstall_enter( & pflags) |
1149 | thrashing = true |
1153 | flags = If behavior == Hold ref to page and take the bit when woken, like* __lock_page() waiting on then setting PG_locked. Then wait_queue_entry::flags Else 0 |
1154 | func = wake_page_function |
1158 | cycle |
1159 | spin_lock_irq( & lock) |
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 | If behavior == Drop ref to page before wait, no check when woken,* like put_and_wait_on_page_locked() on PG_locked. Then put_page(page) |
1174 | If Value is more likely to compile time(bit_is_set) Then io_schedule() |
1185 | If signal_pending_state(state, current process) Then |
1198 | Break |
1204 | If thrashing Then |
1205 | If delayacct Then delayacct_thrashing_end() |
1207 | psi_memstall_leave( & pflags) |
1218 | Return ret |
Name | Describe |
---|---|
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 |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |